RFR: 8371571: Consolidate and enhance bulk memory segment ops benchmarks
Jorn Vernee
jvernee at openjdk.org
Wed Nov 12 14:09:00 UTC 2025
On Wed, 12 Nov 2025 09:08:10 GMT, Per Minborg <pminborg 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/SegmentBulkCopy.java line 160:
> 158: public void copyUnsafe() {
> 159: MemorySegment.copy(srcSegment, 0, dstSegment, 0, size);
> 160: }
Shouldn't this method be using `Unsafe`? (similar for the other classes)
test/micro/org/openjdk/bench/java/lang/foreign/SegmentBulkHash.java line 58:
> 56:
> 57: @Param({"2", /*"3", "4", "5", "6", "7", "8", "12", "16", "64", "512",
> 58: "4096", "32768", "262144", "2097152", "16777216", "134217728"*/})
I think you forgot to uncomment this
test/micro/org/openjdk/bench/java/lang/foreign/SegmentBulkHash.java line 113:
> 111: }
> 112:
> 113: // Always use the same alignment regardless of size
Leftover comment?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28260#discussion_r2518436374
PR Review Comment: https://git.openjdk.org/jdk/pull/28260#discussion_r2518437872
PR Review Comment: https://git.openjdk.org/jdk/pull/28260#discussion_r2518441123
More information about the core-libs-dev
mailing list