Function insertion_sort_shift_left

Source
fn insertion_sort_shift_left<T, F>(v: &mut [T], offset: usize, is_less: &F)
where F: Fn(&T, &T) -> bool,
Expand description

Sort v assuming v[..offset] is already sorted.

Never inline this function to avoid code bloat. It still optimizes nicely and has practically no performance impact. Even improving performance in some cases.