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

Per Minborg pminborg at openjdk.org
Wed Nov 12 13:51:04 UTC 2025


On Wed, 12 Nov 2025 13:34:54 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> This PR proposes to consolidate and standardize the benchmarks related to the bulk operations for memory segments. 
>> 
>> All the benchmarks will now run with (heap|native)x(aligned|unaligned)x(intint|intlong|longlong) combinations.
>> 
>> It should be noted that with this change, the running time for the benchmarks would increase significantly.
>
> 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.

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

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


More information about the core-libs-dev mailing list