Crate glidesort

Source
Expand description

Glidesort is a novel stable sorting algorithm that combines the best-case behavior of Timsort-style merge sorts for pre-sorted data with the best-case behavior of pattern-defeating quicksort for data with many duplicates. It is a comparison-based sort supporting arbitrary comparison operators, and while exceptional on data with patterns it is also very fast for random data.

For more information see the readme.

Functionsยง

sort
See slice::sort.
sort_by
See slice::sort_by.
sort_by_key
See slice::sort_by_key.
sort_in_vec
Like sort, except this function allocates its space at the end of the given Vec.
sort_in_vec_by
Like sort_by, except this function allocates its space at the end of the given Vec.
sort_in_vec_by_key
Like sort_by_key, except this function allocates its space at the end of the given Vec.
sort_with_buffer
Like sort, except this function does not allocate and uses the passed buffer instead.
sort_with_buffer_by
Like sort_by, except this function does not allocate and uses the passed buffer instead.
sort_with_buffer_by_key
Like sort_by_key, except this function does not allocate and uses the passed buffer instead.
sort_with_vec
Like sort, except this function allocates its scratch space with scratch_buf.reserve(_).
sort_with_vec_by
Like sort_by, except this function allocates its scratch space with scratch_buf.reserve(_).
sort_with_vec_by_key
Like sort_by_key, except this function allocates its scratch space with scratch_buf.reserve(_).