[foreign-memaccess+abi] RFR: Add benchmark [v3]

Uwe Schindler uschindler at openjdk.org
Mon Jan 2 09:14:15 UTC 2023


On Mon, 19 Dec 2022 11:59:44 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> This PR proposed to add a new benchmark outlining potential performance gains with the FFM API in internal JDK classes.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add case for singel invocation

Side note:

If you intend to just replace `java.nio.Bits` in JDK, there is another way to do this also without even using Panama. We use the following VarHandles now since long time everywhere in Lucene to put/get long/int/shorts from/to `byte[]`: https://github.com/apache/lucene/blob/e2ee09d0c56fcd60da9368bd2898587df09c894d/lucene/core/src/java/org/apache/lucene/util/BitUtil.java#L32-L116

This may be cheaper than creating a MemorySegment view on top of java arrays.

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

PR: https://git.openjdk.org/panama-foreign/pull/761


More information about the panama-dev mailing list