<div dir="ltr">I think there is more meaning in reimplementing strlen in Panama.<br><div><br></div><div>For example, we can try to scan both '\0' and negative bytes within a method, which can provide a fast path for ASCII strings without decoding and array copying.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 26, 2023 at 9:18 PM Sebastian Stenzel <<a href="mailto:sebastian.stenzel@gmail.com">sebastian.stenzel@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> Am 26.03.2023 um 14:46 schrieb Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com" target="_blank">maurizio.cimadamore@oracle.com</a>>:<br>
> <br>
> Forgot: another problem is that just offloading to external "strlen" will not respect the memory segment boundaries (e.g. the underlying strlen will keep going even past the spatial boundaries of the memory segment).<br>
<br>
How about using strnlen? At least for native segments?<br>
<br>
Improving string conversion efficiency would make a huge difference in my FUSE bindings, where virtually every call contains a file path.</blockquote></div>