RFR: 8371571: Consolidate and enhance bulk memory segment ops benchmarks

Emanuel Peter epeter at openjdk.org
Wed Nov 12 14:09:03 UTC 2025


On Wed, 12 Nov 2025 13:48:38 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> test/micro/org/openjdk/bench/java/lang/foreign/SegmentBulkMismatch.java line 122:
>> 
>>> 120:                     srcSegment = srcSegment.asSlice(1, size);
>>> 121:                     dstSegment = dstSegment.asSlice(1, size);
>>> 122:                 }
>> 
>> What do you hope to acheive with this? I hope that the intrinsics automatically align the vectors, right? Or are you checking for exactly that?
>
> Yepp. The idea was to test the impact of alignment, as the hand-rolled version uses unaligned access, and the intrinsics might align its bulk operations.

Ok. But what kind of guarantee do you think you are getting from the byte array? With Lilliput (and maybe without), it may only be a 4 byte alignment, it may actually be unaligned that way for your long accesses. Are you aware of that?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28260#discussion_r2518444080


More information about the core-libs-dev mailing list