1414 * {@link java.util.Arrays.parallelSort(int[])}.
1515 *
1616 * @author Rodion "rodde" Efremov
17- * @version 1.6 (Jun 3, 2023 )
18- * @since 1.6 (Jun 3, 2023)
17+ * @version 1.1 (Jul 1, 2025 )
18+ * @since 1.0 (Jun 3, 2023)
1919 */
2020public final class ParallelRadixSort {
2121
@@ -32,7 +32,7 @@ public final class ParallelRadixSort {
3232 /**
3333 * The mask for extracting the sign bit.
3434 */
35- private static final int SIGN_BIT_MASK = 0x8000_0000 ;
35+ private static final long SIGN_BIT_MASK = 0x8000_0000_0000_0000L ;
3636
3737 /**
3838 * The number of bits per byte.
@@ -48,19 +48,7 @@ public final class ParallelRadixSort {
4848 * The mask for extracting a byte.
4949 */
5050 private static final long EXTRACT_BYTE_MASK = 0xff ;
51-
52- /**
53- * The array slices smaller than this number of elements will be sorted with
54- * merge sort.
55- */
56- static final int DEFAULT_MERGESORT_THRESHOLD = 307 ;
57-
58- /**
59- * The array slices smaller than this number of elements will be sorted with
60- * insertion sort.
61- */
62- static final int DEFAULT_INSERTION_SORT_THRESHOLD = 17 ;
63-
51+
6452 /**
6553 * The minimum workload for a thread.
6654 */
@@ -95,7 +83,9 @@ public static void setMinimumThreadWorkload(int newMinimumThreadWorkload) {
9583 * @param array the array to sort.
9684 */
9785 public static void parallelSort (long [] array ) {
98- parallelSort (array , 0 , array .length );
86+ parallelSort (array ,
87+ 0 ,
88+ array .length );
9989 }
10090
10191 /**
0 commit comments