RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy [v5]

Steve Dohrmann duke at openjdk.org
Tue Nov 21 21:39:10 UTC 2023


On Tue, 21 Nov 2023 01:14:49 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Steve Dohrmann has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits:
>> 
>>  - Merge branch 'master' into memcpy
>>  - Update full name
>>    Previous commit (fcbbc0d7880) added org.openjdk.bench.java.lang.ArrayCopyAlignedLarge benchmark
>>  - - remerge upstream master
>>    - remove ::copy test from XorTest
>>  - Merge branch 'master' into memcpy
>>  - - fix whitespace error
>>  - Merge branch 'master' of https://git.openjdk.org/jdk into memcpy
>>  - - bug fix: only generate / use large copy code if MaxVectorSize == 64
>>  - - fix whitespace issues
>>    - fix xor test foreign impl constructor signature
>>  - - initial commit -- optimize large array cases in StubGenerator::generate_disjoint_copy_avx3_masked
>>      - add src address prefetches
>>      - switch to non-temporal writes
>>      - added modified jmh benchmark based on xor benchmark from Maurizio Cimadamore
>
> src/hotspot/cpu/x86/stubGenerator_x86_64_arraycopy.cpp line 768:
> 
>> 766:     }
>> 767:     __ movq(temp3, temp2);
>> 768:     copy64_masked_avx(to, from, xmm1, k2, temp3, temp4, temp1, shift, 0);
> 
> The last argument should be "true" or "1" instead of "0" or "false".  This is as temp3 (length) could be less than 32 as well. This case is only handled when use64byteVector argument is true.

Thanks, done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16575#discussion_r1401229608


More information about the core-libs-dev mailing list