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

Per Minborg pminborg at openjdk.org
Mon Jan 2 10:29:13 UTC 2023


On Mon, 2 Jan 2023 09:09:15 GMT, Uwe Schindler <uschindler at openjdk.org> wrote:

>> 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.

Thanks @uschindler . I have created another PR that relates to your comments here https://github.com/openjdk/panama-foreign/pull/762

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

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


More information about the panama-dev mailing list