On Fri, 25 Aug 2023 01:52:32 GMT, Sandhya Viswanathan 
<sviswanat...@openjdk.org> wrote:

>> 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.

As suggested, the code was updated to no longer pass the 
offset(Unsafe.ARRAY_INT_BASE_OFFSET) for pivotIndices array. Please see the 
code in the latest commit.

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

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

Reply via email to