Skip to main content

filter_cpu

Function filter_cpu 

Source
pub fn filter_cpu<T, F>(items: Vec<T>, pred: F) -> Vec<T>
where T: Send, F: Fn(&T) -> bool + Sync + Send,
Expand description

Parallel filter with the same threshold rule as map_cpu (PAR-84).

Sequential when items.len() < CPU_MAP_THRESHOLD so small console/net buffers never pay Rayon coordination overhead.