Merge Strategies: from Merge Sort to TimSort

Abstract : The introduction of TimSort as the standard algorithm for sorting in Java and Python questions the generally accepted idea that merge algorithms are not competitive for sorting in practice. In an at- tempt to better understand TimSort algorithm, we define a framework to study the merging cost of sorting algorithms that relies on merges of monotonic subsequences of the input. We design a simpler yet competi- tive algorithm in the spirit of TimSort based on the same kind of ideas. As a benefit, our framework allows to establish the announced running time of TimSort, that is, O(n log n).
Document type :
Preprints, Working Papers, ...
Complete list of metadatas

Cited literature [4 references]  Display  Hide  Download

https://hal-upec-upem.archives-ouvertes.fr/hal-01212839
Contributor : Carine Pivoteau <>
Submitted on : Wednesday, December 9, 2015 - 3:12:32 PM
Last modification on : Thursday, July 5, 2018 - 2:45:56 PM
Long-term archiving on : Saturday, April 29, 2017 - 8:36:28 AM

File

merge_strategies.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-01212839, version 2

Citation

Nicolas Auger, Cyril Nicaud, Carine Pivoteau. Merge Strategies: from Merge Sort to TimSort. 2015. ⟨hal-01212839v2⟩

Share

Metrics

Record views

3299

Files downloads

3315