[foreign-memaccess+abi] RFR: 8273905: Foreign API refresh [v4]

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Sep 20 14:35:18 UTC 2021


Many thanks for testing this and confirming that there are no regressions!

Maurizio

On 18/09/2021 22:11, Uwe Schindler wrote:
> I did some testing in Apache Lucene with a build of your branch:https://github.com/uschindler/lucene/tree/draft/jdk-foreign-mmap-jdk18  (the relevant change to previous version using the old MemoryCopy stuff is this commit:https://github.com/uschindler/lucene/commit/2de65069a7419edd43f5fc3b63e6e9fa077e2235
>
> The new API looks really good. I also removed all usage of `VarHandle` in the Lucene implementation and just used the versions of `MemorySegment#get(ValueLayout.Xxx,...)` for our positional reads. Interestingly the performance seemed to get a bit better without direct use of VarHandles (maybe because you use `@ForceInline`), but not significant (inside the benchmark's std dev).
>
> The most interesting code for you is here:https://github.com/uschindler/lucene/blob/draft/jdk-foreign-mmap-jdk18/lucene/core/src/java/org/apache/lucene/store/MemorySegmentIndexInput.java


More information about the panama-dev mailing list