Replacement of Quicksort in java.util.Arrays with new Dual-Pivot Quicksort

quitos marquits at marquits.com
Tue Oct 6 23:11:25 UTC 2009


I suppose if the array is small enough, it is better to use simple Quicksort. 
And the larger the array, the more sense it makes to use more pivots, because 
the calculation cost of comparing against many pivots becomes more affordable 
than iterating for a larger subset.
So you think the optimal number of pivots to use could be directly linked to the 
size of the array you're trying to sort?





More information about the core-libs-dev mailing list