volume 20 issue 4 pages 1-55

Adaptive Shivers Sort: An Alternative Sorting Algorithm

Publication typeJournal Article
Publication date2024-08-05
scimago Q1
wos Q2
SJR1.650
CiteScore3.7
Impact factor1.4
ISSN15496325, 15496333
Abstract

We present a new sorting algorithm, called adaptive ShiversSort , that exploits the existence of monotonic runs for sorting efficiently partially sorted data. This algorithm is a variant of the well-known algorithm TimSort , which is the sorting algorithm used in standard libraries of programming languages, such as Python or Java (for non-primitive types). More precisely, adaptive ShiversSort is a so-called \(k\) -aware merge-sort algorithm, a class that captures ‘ TimSort -like’ algorithms and that was introduced by Buss and Knop.

In this article, we prove that, although adaptive ShiversSort is simple to implement and differs only slightly from TimSort , its computational cost, in number of comparisons performed, is optimal within the class of natural merge-sort algorithms, up to a small additive linear term. This makes adaptive ShiversSort the first \(k\) -aware algorithm to benefit from this property, which is also a 33% improvement over TimSort 's worst-case. This suggests that adaptive ShiversSort could be a strong contender for being used instead of TimSort .

Then, we investigate the optimality of \(k\) -aware algorithms. We give lower and upper bounds on the best approximation factors of such algorithms, compared to optimal stable natural merge-sort algorithms. In particular, we design generalisations of adaptive ShiversSort whose computational costs are optimal up to arbitrarily small multiplicative factors.

Found 
Found 

Top-30

Journals

1
Algorithmica
1 publication, 50%
PROBLEMS IN PROGRAMMING
1 publication, 50%
1

Publishers

1
Springer Nature
1 publication, 50%
National Academy of Sciences of Ukraine (Co. LTD Ukrinformnauka) (Publications)
1 publication, 50%
1
  • We do not take into account publications without a DOI.
  • Statistics recalculated weekly.

Are you a researcher?

Create a profile to get free access to personal recommendations for colleagues and new articles.
Metrics
2
Share
Cite this
GOST |
Cite this
GOST Copy
Jugé V. Adaptive Shivers Sort: An Alternative Sorting Algorithm // ACM Transactions on Algorithms. 2024. Vol. 20. No. 4. pp. 1-55.
GOST all authors (up to 50) Copy
Jugé V. Adaptive Shivers Sort: An Alternative Sorting Algorithm // ACM Transactions on Algorithms. 2024. Vol. 20. No. 4. pp. 1-55.
RIS |
Cite this
RIS Copy
TY - JOUR
DO - 10.1145/3664195
UR - https://dl.acm.org/doi/10.1145/3664195
TI - Adaptive Shivers Sort: An Alternative Sorting Algorithm
T2 - ACM Transactions on Algorithms
AU - Jugé, Vincent
PY - 2024
DA - 2024/08/05
PB - Association for Computing Machinery (ACM)
SP - 1-55
IS - 4
VL - 20
SN - 1549-6325
SN - 1549-6333
ER -
BibTex |
Cite this
BibTex (up to 50 authors) Copy
@article{2024_Jugé,
author = {Vincent Jugé},
title = {Adaptive Shivers Sort: An Alternative Sorting Algorithm},
journal = {ACM Transactions on Algorithms},
year = {2024},
volume = {20},
publisher = {Association for Computing Machinery (ACM)},
month = {aug},
url = {https://dl.acm.org/doi/10.1145/3664195},
number = {4},
pages = {1--55},
doi = {10.1145/3664195}
}
MLA
Cite this
MLA Copy
Jugé, Vincent. “Adaptive Shivers Sort: An Alternative Sorting Algorithm.” ACM Transactions on Algorithms, vol. 20, no. 4, Aug. 2024, pp. 1-55. https://dl.acm.org/doi/10.1145/3664195.