This module contains a sorting algorithm based on Orson Peters’ pattern-defeating quicksort, published at: https://github.com/orlp/pdqsort
Unstable sorting is compatible with core because it doesn’t allocate memory, unlike our stable sorting implementation.
In addition it also contains the core logic of the stable sort used by
slice::sort based on
- TimSortRunExperimentalInternal type used by merge_sort.
vusing heapsort, which guarantees O(n * log(n)) worst-case.
- merge_sortExperimentalThis merge sort borrows some (but not all) ideas from TimSort, which used to be described in detail here. However Python has switched to a Powersort based implementation.
vusing pattern-defeating quicksort, which is O(n * log(n)) worst-case.