Skip to Main content Skip to Navigation
Preprints, Working Papers, ...

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 metadata

Cited literature [4 references]  Display  Hide  Download
Contributor : Carine Pivoteau Connect in order to contact the contributor
Submitted on : Wednesday, December 9, 2015 - 3:12:32 PM
Last modification on : Thursday, September 29, 2022 - 2:21:15 PM
Long-term archiving on: : Saturday, April 29, 2017 - 8:36:28 AM


Files produced by the author(s)


  • HAL Id : hal-01212839, version 2


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



Record views


Files downloads