RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v15]
Laurent Bourgès
lbourges at openjdk.org
Sun Jul 10 10:23:09 UTC 2022
On Thu, 7 Jul 2022 15:58:33 GMT, iaroslavski <duke at openjdk.org> wrote:
>> Sorting:
>>
>> - adopt radix sort for sequential and parallel sorts on int/long/float/double arrays (almost random and length > 6K)
>> - fix tryMergeRuns() to better handle case when the last run is a single element
>> - minor javadoc and comment changes
>>
>> Testing:
>> - add new data inputs in tests for sorting
>> - add min/max/infinity values to float/double testing
>> - add tests for radix sort
>
> iaroslavski has updated the pull request incrementally with one additional commit since the last revision:
>
> JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort)
>
> * Added JMH
Here are JMH test results on my stable perf laptop (cpu fixed: 4 real cpu cores at 2ghz, HT disabled, i7 6820k):
https://github.com/bourgesl/bourgesl.github.io/blob/master/bench-220709-summary-2.log
It confirms Vladimir results: 50% gain in average in parallelSort(), huge gains (x5) on large random arrays...
As DPQS relies on ForkJoinPool.getCommonParallelism = 3 on my machine, MT speedup is only x3 !
I observed max 300%/400% cpu load when parallelSort() runs on large arrays...
Why does it return NCpuCore - 1 ?
-------------
PR: https://git.openjdk.org/jdk/pull/3938
More information about the core-libs-dev
mailing list