[foreign-memaccess+abi] RFR: 8311594: Avoid GlobalSession liveness check [v2]

Brian S. O'Neill duke at openjdk.org
Tue Jul 11 16:54:21 UTC 2023


On Tue, 11 Jul 2023 14:54:18 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> I'm working on a smaller test at the moment. The critical performance operation overall is a binary search within a b-tree node. Each comparison obtains a 2-byte pointer which references a binary key, which itself starts with a byte field to encode the length. The comparison does a byte-by-byte check of keys.
>> 
>> I've tried to optimize this in the past by doing larger comparisons (8 bytes at a time), but it didn't show much improvement. I assumed that HotSpot was already doing some optimizations that were good enough, and so I didn't bother with any more experiments.
>> 
>> Anyhow, with a test program which just stresses this critical bottleneck, the Panama version is two times slower than the Unsafe version. I'll work on creating something smaller and standalone (it won't suck in the whole project).
>
> Stuff like this can be very helpful, thanks!

Panama vs. Unsafe: https://gist.github.com/broneill/3a39051635e3cb758d0cca5a963c685e

-------------

PR Review Comment: https://git.openjdk.org/panama-foreign/pull/844#discussion_r1260006906


More information about the panama-dev mailing list