Skip to main content

count_lwb_parallel

Function count_lwb_parallel 

Source
pub fn count_lwb_parallel(data: &[u8], utf8: bool) -> (u64, u64, u64)
Expand description

Parallel counting of lines + words + bytes only (no chars). Optimized for the default wc mode: avoids unnecessary char-counting pass. C locale: single fused pass per chunk counts BOTH lines and words. UTF-8: checks ASCII first for C locale fast path, else splits at newlines for safe parallel UTF-8 word counting.