Skip to main content

sort_cpu

Function sort_cpu 

Source
pub fn sort_cpu<T>(items: &mut [T])
where T: Ord + Send,
Expand description

In-place sort with Rayon when items.len() >= CPU_MAP_THRESHOLD (PAR-94).

Uses par_sort_unstable for large collections (rule: prefer unstable sort when total order equality is acceptable for agent determinism of equal keys). Small slices stay sequential to avoid coordination overhead.