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

iaroslavski duke at openjdk.org
Sat Aug 12 22:29:58 UTC 2023


On Fri, 4 Aug 2023 22:29:37 GMT, Srinivas Vamsi Parasa <duke at openjdk.org> wrote:

>>> Also need to handle arraySort in file: share/gc/shenandoah/c2/shenandoahSupport.cpp, function: ShenandoahBarrierC2Support::verify around line 3000.
>> 
>> Updated the code in ShenandoahBarrierC2Support as suggested.
>
>> @vamsi-parasa With fastdebug build I see the following error: Internal Error (jdk/src/hotspot/share/opto/escape.cpp:1196), pid=3543536, tid=3543559 fatal error: EA unexpected CallLeaf arraysort_stub
>> 
>> Please take a look.
> 
> This was fixed as well.

Hello @vamsi-parasa !

Thank you for your improvements of sorting!
Please see my comments and suggestions:

1. You introduced one method arraySort which is common for int/float/long/double types.
What if we have 4 methods for each type? In this case we don't need switch and UnsupportedOperationException.
What do you think?

2. Please pay attention to the argument "long offset" in method arraySort().
It is not used in this method. What is it for?

3. Do you have plan to apply your approach to Arrays.parallelSort()?

4. I see benchmarking file test/micro/org/openjdk/bench/java/util/ArraysSort.java,
sounds good, thank you for testing! At the same time in the PR https://github.com/openjdk/jdk/pull/13568
we have other benchmarking test with the same name. It would be nice to have one version.
Could you please run benchmarking test from the PR https://github.com/openjdk/jdk/pull/13568
with your changes?

5. As you can see the PR https://github.com/openjdk/jdk/pull/13568 contains the optimized
version of DualPivotQuicksort. I appreciate if you run both benchmarking tests with updated
class DualPivotQuicksort and share results.

Many thanks,
Vladimir Yaroslavskiy

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

PR Comment: https://git.openjdk.org/jdk/pull/14227#issuecomment-1676124093


More information about the hotspot-compiler-dev mailing list