iKeySort
A fast sorting algorithm combining bin and counting sort. Optimized for scenarios where a primary key can be extracted to index elements into buckets.
Examples
1) Sort by a single key
use OneKeySort;
let mut v = vec!;
v.sort_by_one_key;
assert_eq!;
parallel is ignored unless feature allow_multithreading is enabled.
2) Sort by a key, then by a comparator
use OneKeyAndCmpSort;
let mut v = vec!;
v.sort_by_one_key_then_by;
assert_eq!;
3) Sort by two keys
use TwoKeysSort;
let mut v = vec!;
v.sort_by_two_keys;
assert_eq!;
4) Two keys, then comparator (three-way)
use TwoKeysAndCmpSort;
let mut v = vec!;
v.sort_by_two_keys_then_by;
assert_eq!;
5) Reusing a buffer to avoid allocations
use TwoKeysAndCmpSort;
use MaybeUninit;
let mut buf: = Vecnew;
let mut v = vec!;
v.sort_by_one_key_and_buffer;
assert_eq!;