On Wed, 12 Nov 2025 14:03:23 GMT, Jorn Vernee <[email protected]> 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)

By setting the JVM-parameter to zero, the Unsafe variant is _always_ invoked.

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

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

Reply via email to