Module drift

Source
๐Ÿ”ฌThis is a nightly-only experimental API. (slice_internals)
Expand description

This module contains the hybrid top-level loop combining bottom-up Mergesort with top-down Quicksort.

Structsยง

DriftsortRun ๐Ÿ”’ Experimental
Compactly stores the length of a run, and whether or not it is sorted. This can always fit in a usize because the maximum slice length is isize::MAX.

Functionsยง

create_run ๐Ÿ”’ Experimental
Creates a new logical run.
logical_merge ๐Ÿ”’ Experimental
merge_tree_depth ๐Ÿ”’ Experimental
merge_tree_scale_factor ๐Ÿ”’ Experimental
sortExperimental
Sorts v based on comparison function is_less. If eager_sort is true, it will only do small-sorts and physical merges, ensuring O(N * log(N)) worst-case complexity. scratch.len() must be at least max(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