[foreign-jextract] RFR: MemorySegmentPool + Allocator [v8]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri Apr 23 01:16:41 UTC 2021


On Thu, 22 Apr 2021 22:21:04 GMT, Radoslaw Smogura <github.com+7535718+rsmogura at openjdk.org> wrote:

>> I checked it, and I get same results. I'll shortly send an updated version
>
> Catched! It's not int, I use calculate leading zeros, I guess this a barrier for VM. Replacing size by size with align makes it fast.
> 
> But  it's about size value

Good catch - I'm not sure I follow the various @DontInline and such - I hope the code is not too tailored to the specific benchmark. But the numbers are rather good - now even the clean API gives numbers that beat malloc considerably (I honestly would leave the direct API alone). This is indeed a good direction - while I'm not planning to add something like this at this stage, we will, at some point after 17, ramp up some discussion around allocation strategy, and it seems like we got a good contender here ;-) 

Many thanks for your efforts.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/509


More information about the panama-dev mailing list