The java.util.DualPivotQuicksort class implements sort() methods for the 
primitive types, has no methods that deal with generic arrays with methods like

static <T extends Comparable<? super T>> void sort(T[] array, int iStart, int 
iEnd)

or

static <T extends Comparable<? super T>> void sort(T[] a, int left, int right, 
T[] work, int workBase, int workLen)

Similarly, it contains no methods for Comparator-based sorting of generic 
arrays. Might it make sense to add such methods to DualPivotQucksort? The 
Arrays.sort() methods for generic arrays use TimSort which is likely to be 
slower. TimSort is stable and DualPivotQuickSort is not. Might it make sense to 
allow the user to pick a stable or an unstable version of a generic 
Arrays.sort() and use TimSort when stability is desired and DualPivotQuicksort 
when it is not?

Reply via email to