RFR: 8339531: Improve performance of MemorySegment::mismatch [v8]

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Sep 5 17:40:54 UTC 2024


On Thu, 5 Sep 2024 17:21:32 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> This PR proposes to improve the performance of `MemorySegment::mismatch` by using Java code rather than transitioning to native code.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Lower the mismatch threshold

test/micro/org/openjdk/bench/java/lang/foreign/TestMismatch.java line 91:

> 89:     @Benchmark
> 90:     public long heapSegmentJava() {
> 91:         return srcNative.mismatch(dstNative);

this should use heap segments

test/micro/org/openjdk/bench/java/lang/foreign/TestMismatch.java line 103:

> 101:     @Benchmark
> 102:     public long heapSegmentUnsafe() {
> 103:         return srcNative.mismatch(dstNative);

this should use heap segments

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20848#discussion_r1745930749
PR Review Comment: https://git.openjdk.org/jdk/pull/20848#discussion_r1745930965


More information about the core-libs-dev mailing list