Slightly faster java.util.Arrays.byteSort(byte[])
Zheka Kozlov
orionllmain at gmail.com
Mon Jun 17 06:11:29 UTC 2019
Hi Rodion.
Your implementation is indeed a bit faster on large arrays. However, it's
much slower on small arrays (~10 elements). My JMH benchmark says it is
about 7 times slower.
сб, 15 июн. 2019 г. в 03:36, Rodion Efremov <coderodd3 at gmail.com>:
> 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