QuickMergesort: Practically Efficient Constant-Factor Optimal Sorting
Stefan Edelkamp, Armin Wei{\ss}

TL;DR
QuickMergesort combines Quicksort and Mergesort with median-of-sqrt(n) pivot selection to achieve near-optimal comparison counts and practical efficiency, outperforming existing sorting algorithms in experiments.
Contribution
The paper introduces a practical version of QuickMergesort with median-of-3 pivot selection that is both comparison-efficient and fast in practice, surpassing current library sorts.
Findings
QuickMergesort requires at most n log n - 0.75n comparisons on average.
The median-of-3 pivot selection maintains efficiency with minimal overhead.
Experimental results show it outperforms C++'s Introsort and Java's Dual-Pivot Quicksort.
Abstract
We consider the fundamental problem of internally sorting a sequence of elements. In its best theoretical setting QuickMergesort, a combination Quicksort with Mergesort with a Median-of- pivot selection, requires at most element comparisons on the average. The questions addressed in this paper is how to make this algorithm practical. As refined pivot selection usually adds much overhead, we show that the Median-of-3 pivot selection of QuickMergesort leads to at most element comparisons on average, while running fast on elementary data. The experiments show that QuickMergesort outperforms state-of-the-art library implementations, including C++'s Introsort and Java's Dual-Pivot Quicksort. Further trade-offs between a low running time and a low number of comparisons are studied. Moreover, we describe a practically…
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 · Machine Learning and Algorithms · semigroups and automata theory
