Function rayon::slice::quicksort::partition_in_blocks

source ยท
fn partition_in_blocks<T, F>(v: &mut [T], pivot: &T, is_less: &F) -> usize
where F: Fn(&T, &T) -> bool,
Expand description

Partitions v into elements smaller than pivot, followed by elements greater than or equal to pivot.

Returns the number of elements smaller than pivot.

Partitioning is performed block-by-block in order to minimize the cost of branching operations. This idea is presented in the BlockQuicksort paper.