On Wed, 4 Sep 2024 09:09:32 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> This PR proposes to improve the performance of `MemorySegment::mismatch` by 
> using Java code rather than transitioning to native code.

src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java 
line 49:

> 47: 
> 48:     // MISMATCH_NATIVE_THRESHOLD must be a power of two and should be 
> greater than 2^3
> 49:     private static final long MISMATCH_NATIVE_THRESHOLD = 1 << 20;

Should we allow toggling this threshold via properties to allow using 
vectorizedMismatchLargeForBytes for small lengths, such as for testing or 
debugging?

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

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

Reply via email to