Slightly faster java.util.Arrays.byteSort(byte[])

Rodion Efremov coderodd3 at
Fri Jun 14 15:34:34 UTC 2019

Good evening!

I managed to improve the JDK 8 java.util.Arrays.sort(byte[])
performance-wise [1]. The (warmed up) demonstration program produces more
or less optimistic results on arrays of 1e8 bytes:

seed = 1560526264738
java.util.Arrays.sort(byte[]) in 87.643701 milliseconds.
java.util.Arrays.parallelSort(byte[]) in 301.329701 milliseconds.
net.coderodde.Arrays.sort(byte[]) in 62.0763 milliseconds.
Algorithms agree: true

I would like to hear any comments on how to make it eligible for inclusion
in JDK.

Best regards,
Rodion E.


More information about the jdk-dev mailing list