RFR: 8277617: Adjust AVX3Threshold for copy/fill stubs [v6]
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Wed Dec 1 18:44:30 UTC 2021
On Tue, 30 Nov 2021 00:10:39 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> Currently 32-byte instructions are used for small array copy and clear.
>> This can be optimized by using 64-byte instructions.
>>
>> Please review.
>>
>> Best Regards,
>> Sandhya
>
> Sandhya Viswanathan has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix whitespace
Yes, the patch doesn't change behavior on AVX2 and older AVX512 systems.
The additional performance numbers with the patch requested by Nils are as below:
Old AVX512
Before:
Benchmark Mode Cnt Score Error Units
ArrayCopy.arrayCopyObject avgt 5 18.650 ± 2.773 ns/op
ArrayCopy.arrayCopyObjectNonConst avgt 5 20.241 ± 1.398 ns/op
ArrayCopy.arrayCopyObjectSameArraysBackward avgt 5 16.252 ± 0.076 ns/op
ArrayCopy.arrayCopyObjectSameArraysForward avgt 5 15.965 ± 0.172 ns/op
After:
Benchmark Mode Cnt Score Error Units
ArrayCopy.arrayCopyObject avgt 5 17.701 ± 2.623 ns/op
ArrayCopy.arrayCopyObjectNonConst avgt 5 20.588 ± 0.775 ns/op
ArrayCopy.arrayCopyObjectSameArraysBackward avgt 5 16.219 ± 0.066 ns/op
ArrayCopy.arrayCopyObjectSameArraysForward avgt 5 15.937 ± 0.185 ns/op
AVX2
Before:
Benchmark Mode Cnt Score Error Units
ArrayCopy.arrayCopyObject avgt 5 23.801 ± 0.090 ns/op
ArrayCopy.arrayCopyObjectNonConst avgt 5 24.376 ± 0.867 ns/op
ArrayCopy.arrayCopyObjectSameArraysBackward avgt 5 14.015 ± 0.016 ns/op
ArrayCopy.arrayCopyObjectSameArraysForward avgt 5 15.355 ± 0.024 ns/op
After:
Benchmark Mode Cnt Score Error Units
ArrayCopy.arrayCopyObject avgt 5 23.373 ± 0.629 ns/op
ArrayCopy.arrayCopyObjectNonConst avgt 5 24.390 ± 0.875 ns/op
ArrayCopy.arrayCopyObjectSameArraysBackward avgt 5 13.995 ± 0.056 ns/op
ArrayCopy.arrayCopyObjectSameArraysForward avgt 5 15.383 ± 0.051 ns/op
-------------
PR: https://git.openjdk.java.net/jdk/pull/6512
More information about the hotspot-compiler-dev
mailing list