[A little bit faster Arrays.parallelSort for long/int arrays]

Rodion Efremov coderodd3 at gmail.com
Sun Jun 14 10:58:36 UTC 2020


I have this <https://github.com/coderodde/ParallelMSDRadixSort> implementation
of MSD radix sorts for *int/long *arrays. Both run faster than respective
java.util.Arrays.parallelSort methods in light of my benchmarking:

seed = 1592131844387
Warming up on long arrays...

seed = 1592131852073
Benchmarking on long arrays...
coderodde's Arrays.parallelSort: 845
Java's Arrays.parallelSort     : 1119
Java's Arrays.sort             : 4141

seed = 1592131859902
Warming up on int arrays...

seed = 1592131866867
Benchmarking on int arrays...
coderodde's Arrays.parallelSort: 601
Java's Arrays.parallelSort     : 1023
Java's Arrays.sort             : 4384

(Above all figures in milliseconds while sorting (random) arrays of length
50 million array components. Also, warming arrays are 50 million components
as well.)

Do we need the above implementations of Arrays.parallelSort in JDK?

Best regards,
Rodion E.

More information about the jdk-dev mailing list