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

Rodion Efremov coderodd3 at gmail.com
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.

References: [1] https://gist.github.com/coderodde/493407bc1c57352b53c2aa18b5c9a7a8



More information about the jdk-dev mailing list