RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v26]
Sandhya Viswanathan
sviswanathan at openjdk.org
Fri Aug 25 01:57:41 UTC 2023
On Thu, 24 Aug 2023 23:43:36 GMT, Srinivas Vamsi Parasa <duke at openjdk.org> wrote:
>> src/java.base/share/classes/java/util/DualPivotQuicksort.java line 389:
>>
>>> 387: */
>>> 388: pivotIndices = new int[] {e1, e5};
>>> 389: Arrays.arrayPartition(int.class, a, baseOffset, low, high, pivotIndices, Unsafe.ARRAY_INT_BASE_OFFSET, isDualPivot);
>>
>> The Unsafe.ARRAY_INT_BASE_OFFSET parameter after pivotIndices is not needed.
>
> pivotIndices array is being passed as a parameter to the partition intrinsic as it is updated in-place with the new pivot indices after partitioning. The Unsafe.ARRAY_INT_BASE_OFFSET is being used in libary_call.cpp to get the address of pivotIndices.
As PivotIndices is local to the DualPivotQuickSort and is always going to be int array, there are other ways to compute the address in library_call.cpp without having to pass an additional argument.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14227#discussion_r1305037445
More information about the hotspot-compiler-dev
mailing list