Skip to main content

should_use_parallel

Function should_use_parallel 

Source
pub fn should_use_parallel(paths: &[&Path]) -> bool
Expand description

Check if parallel hashing is worthwhile for the given file paths. Always parallelize with 2+ files — rayon’s thread pool is lazily initialized once and reused, so per-file work-stealing overhead is negligible (~1µs). Removing the stat()-based size check eliminates N extra syscalls for N files.