Average Case and Distributional Analysis of Dual-Pivot Quicksort
Sebastian Wild, Markus E. Nebel, Ralph Neininger

TL;DR
This paper provides a detailed average case and distributional analysis of Yaroslavskiy's dual-pivot Quicksort, revealing insights into its performance and bytecode instruction counts, and comparing it to classic Quicksort.
Contribution
It extends previous analyses by precisely quantifying Bytecode instructions and distributional costs, clarifying the algorithm's efficiency in practical implementations.
Findings
Yaroslavskiy's Quicksort requires slightly more Bytecode instructions than classic Quicksort.
Incorporating Insertionsort speeds up Yaroslavskiy's Quicksort in terms of Bytecodes.
Costs of Yaroslavskiy's algorithm concentrate around the mean for large input sizes.
Abstract
In 2009, Oracle replaced the long-serving sorting algorithm in its Java 7 runtime library by a new dual-pivot Quicksort variant due to Vladimir Yaroslavskiy. The decision was based on the strikingly good performance of Yaroslavskiy's implementation in running time experiments. At that time, no precise investigations of the algorithm were available to explain its superior performance - on the contrary: Previous theoretical studies of other dual-pivot Quicksort variants even discouraged the use of two pivots. Only in 2012, two of the authors gave an average case analysis of a simplified version of Yaroslavskiy's algorithm, proving that savings in the number of comparisons are possible. However, Yaroslavskiy's algorithm needs more swaps, which renders the analysis inconclusive. To force the issue, we herein extend our analysis to the fully detailed style of Knuth: We determine the exact…
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.
