# Why does Base only have Merge Insertion and Quick sorting algorithms?

**URL:** <https://discourse.julialang.org/t/why-does-base-only-have-merge-insertion-and-quick-sorting-algorithms/65210>\
**Category:** Internals & Design\
**Tags:** sort\
**Created:** [July 23, 2021, 8:59pm UTC](https://discourse.julialang.org/t/why-does-base-only-have-merge-insertion-and-quick-sorting-algorithms/65210 "2021-07-23T20:59:15Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [August 6, 2021, 12:07pm UTC](https://discourse.julialang.org/t/why-does-base-only-have-merge-insertion-and-quick-sorting-algorithms/65210/17 "2021-08-06T12:07:40Z")

</div>

A.  
The fastest stable sort (published last month, based on his quadsort that’s “faster than quicksort”) seems to be: [GitHub - scandum/blitsort: Blitsort is an in-place stable adaptive rotate mergesort / quicksort.](https://github.com/scandum/blitsort)

> Blitsort uses a [monobound binary search](https://github.com/scandum/binary_search), which is up to two times faster than the binary search in general use.
> 
> ## Trinity rotation
> 
> Blitsort uses a [trinity rotation](https://github.com/scandum/rotate), a new and significantly faster array rotation algorithm.  
> […]
> 
> By default blitsort uses 512 elements worth of stack memory. […] Blitsort rotate merges recursively, requiring an additional log(n) memory. It’s possible to make this O(1) through the implementation of a stack.
> 
> ## Performance
> 
> Blitsort has exceptional performance due to the quad swap, monobound binary search, and trinity rotation. It is likely the fastest in-place stable sort written so far and is about 15% faster than [octosort](https://github.com/scandum/octosort), which is a block merge sort.
> 
> Blitsort’s performance is similar to that of quadsort as long as

His quad sort and all the variants are also very well documented, and also WikiSort:

B.  
**WikiSort vs. std::stable\_sort()**  
(clang++ version 3.2, sorting 0 to 1.5 million items)

Up do 1280% faster, always faster for the many cases in the two tables there, except for one “95% as fast”

---

_[View the full topic](https://discourse.julialang.org/t/why-does-base-only-have-merge-insertion-and-quick-sorting-algorithms/65210)._
