Pivot Sampling in Dual-Pivot Quicksort
Markus E. Nebel, Sebastian Wild

TL;DR
This paper analyzes the dual-pivot Quicksort algorithm, revealing how choosing skewed pivots based on sample order statistics can optimize performance depending on the cost measure, contrasting with classic median-based pivot selection.
Contribution
It extends the analysis of dual-pivot Quicksort to fixed sample order statistics, showing that skewed pivots outperform symmetric ones depending on the cost measure.
Findings
Skewed pivots can be more efficient than median pivots in dual-pivot Quicksort.
Optimal skew depends on the specific cost measure used.
Different cost measures lead to different optimal pivot choices.
Abstract
The new dual-pivot Quicksort by Vladimir Yaroslavskiy - used in Oracle's Java runtime library since version 7 - features intriguing asymmetries in its behavior. They were shown to cause a basic variant of this algorithm to use less comparisons than classic single-pivot Quicksort implementations. In this paper, we extend the analysis to the case where the two pivots are chosen as fixed order statistics of a random sample and give the precise leading term of the average number of comparisons, swaps and executed Java Bytecode instructions. It turns out that - unlike for classic Quicksort, where it is optimal to choose the pivot as median of the sample - the asymmetries in Yaroslavskiy's algorithm render pivots with a systematic skew more efficient than the symmetric choice. Moreover, the optimal skew heavily depends on the employed cost measure; most strikingly, abstract costs like the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Blind Source Separation Techniques · Numerical Methods and Algorithms
