RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

Vladimir Ivanov vlivanov at openjdk.org
Wed Oct 11 23:29:00 UTC 2023


On Wed, 11 Oct 2023 23:25:22 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Srinivas Vamsi Parasa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 45 commits:
>> 
>>  - fix code style and formatting
>>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into avx512sort
>>  - Update CompileThresholdScaling only for the sort and partition intrinsics; update build script to remove nested if
>>  - change variable names of indexPivot* to pivotIndex*
>>  - Update DualPivotQuicksort.java
>>  - Rename arraySort and arrayPartition Java methods to sort and partition. Cleanup some comments
>>  - Remove the unnecessary exception in single pivot partitioning fallback method
>>  - Move functional interfaces close to the associated methods
>>  - Refactor the sort and partition intrinsics to accept method references for fallback functions
>>  - Refactor stub handling to use a generic function for all types
>>  - ... and 35 more: https://git.openjdk.org/jdk/compare/a1c9587c...a5262d86
>
> src/java.base/share/classes/java/util/DualPivotQuicksort.java line 157:
> 
>> 155:     @ForceInline
>> 156:     private static <A> void sort(Class<?> elemType, A array, long offset, int low, int high, SortOperation<A> so) {
>> 157:         so.sort(array, low, high);
> 
> I'm late to the party, but how does the fallback implementation work (or is intended to) for off-heap case (null + absolute base address)?

Also, for on-heap case the fallback implementation is equivalent to intrinsified case only when offset points at the 0th element of the array.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14227#discussion_r1355879636


More information about the hotspot-compiler-dev mailing list