# Hybrid Sorting Algorithmn Timsort and Introsort

**URL:** <https://discourse.julialang.org/t/hybrid-sorting-algorithmn-timsort-and-introsort/113365>\
**Category:** General Usage\
**Created:** [April 22, 2024, 11:41pm UTC](https://discourse.julialang.org/t/hybrid-sorting-algorithmn-timsort-and-introsort/113365 "2024-04-22T23:41:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Post date:** [April 22, 2024, 11:41pm UTC](https://discourse.julialang.org/t/hybrid-sorting-algorithmn-timsort-and-introsort/113365/1 "2024-04-22T23:41:55Z")

</div>

Does anyone know if there is a package to implement this two hybrid sorting algorithmn in Julia. I noticed that it is NOT implemented in the BASE sort function in Julia.

[Timsort - Wikipedia](https://en.wikipedia.org/wiki/Timsort) (used by Python)

[Introsort - Wikipedia](https://en.wikipedia.org/wiki/Introsort) (used by C++ ???)

I would like to try them out in Julia.

Thank you.

---

<div class="post-metadata">

**Author:** ![ericjmorey](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericjmorey/32/207782_2.png) [@ericjmorey](https://discourse.julialang.org/u/ericjmorey)\
**Post date:** [April 23, 2024, 1:39am UTC](https://discourse.julialang.org/t/hybrid-sorting-algorithmn-timsort-and-introsort/113365/2 "2024-04-23T01:39:19Z")

</div>

Timsort is implimented in the [Sorting Algorithms package](https://juliahub.com/ui/Packages/General/SortingAlgorithms). I don’t know about Introsort in Julia.

PS Python switched to a Timsort variant called PowerSort, but I don’t think there’s a registered package that has implemented it in Julia.

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [April 23, 2024, 3:20am UTC](https://discourse.julialang.org/t/hybrid-sorting-algorithmn-timsort-and-introsort/113365/3 "2024-04-23T03:20:12Z")

</div>

[paper describing PowerSort (Munro and Wild)](https://www.wild-inter.net/publications/html/munro-wild-2018.pdf.html)
