๐ฌThis is a nightly-only experimental API. (
slice_internals)Available on neither crate feature
optimize_for_size.Expand description
This module contains the hybrid top-level loop combining bottom-up Mergesort with top-down Quicksort.
Structsยง
- Driftsort
Run ๐Experimental - Compactly stores the length of a run, and whether or not it is sorted. This
can always fit in a
usizebecause the maximum slice length isisize::MAX.
Functionsยง
- create_
run ๐Experimental - Creates a new logical run.
- logical_
merge ๐Experimental - merge_
tree_ ๐depth Experimental - merge_
tree_ ๐scale_ factor Experimental - sort
Experimental - Sorts
vbased on comparison functionis_less. Ifeager_sortis true, it will only do small-sorts and physical merges, ensuring O(N * log(N)) worst-case complexity.scratch.len()must be at leastmax(v.len() - v.len() / 2, SMALL_SORT_GENERAL_SCRATCH_LEN)otherwise the implementation may abort. Fully ascending and descending inputs will be sorted with exactly N - 1 comparisons. - sqrt_
approx ๐Experimental - stable_
quicksort ๐Experimental