QuickMergesort: Practically Efficient Constant-Factor Optimal Sorting

04/26/2018
by   Stefan Edelkamp, et al.
0

We consider the fundamental problem of internally sorting a sequence of n elements. In its best theoretical setting QuickMergesort, a combination Quicksort with Mergesort with a Median-of-√(n) pivot selection, requires at most n n - 1.3999n + o(n) 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 n n - 0.75n + o(n) 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 efficient version with n n + O(n) comparisons in the worst case.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/03/2018

QuickXsort - A Fast Sorting Scheme in Theory and Practice

QuickXsort is a highly efficient in-place sequential sorting scheme that...
research
01/01/2023

Optimization Perspectives on Shellsort

Shellsort is a sorting method that is attractive due to its simplicity, ...
research
06/29/2019

Most abundant isotope peaks and efficient selection on Y=X_1+X_2+... + X_m

The isotope masses and relative abundances for each element are fundamen...
research
05/10/2018

Nearly-Optimal Mergesorts: Fast, Practical Sorting Methods That Optimally Adapt to Existing Runs

We present two stable mergesort variants, "peeksort" and "powersort", th...
research
05/23/2019

On the Average Case of MergeInsertion

MergeInsertion, also known as the Ford-Johnson algorithm, is a sorting a...
research
05/22/2018

On the Worst-Case Complexity of TimSort

TimSort is an intriguing sorting algorithm designed in 2002 for Python, ...
research
07/07/2021

Oblivious Median Slope Selection

We study the median slope selection problem in the oblivious RAM model. ...

Please sign up or login with your details

Forgot password? Click here to reset