Comparing the performance of Panama with JNI, JNA, and JNR - based on Java 21

Glavo zjx001202 at gmail.com
Sun Mar 26 13:26:59 UTC 2023


I think there is more meaning in reimplementing strlen in Panama.

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.

On Sun, Mar 26, 2023 at 9:18 PM Sebastian Stenzel <
sebastian.stenzel at gmail.com> wrote:

>
> > Am 26.03.2023 um 14:46 schrieb Maurizio Cimadamore <
> maurizio.cimadamore at oracle.com>:
> >
> > 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).
>
> How about using strnlen? At least for native segments?
>
> Improving string conversion efficiency would make a huge difference in my
> FUSE bindings, where virtually every call contains a file path.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20230326/5c3e8b40/attachment.htm>


More information about the panama-dev mailing list