1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

wc: Increase buffer size to 256kb

Improves performance by about 4% on large files.
This commit is contained in:
Nicolas Boichat 2025-05-14 14:12:35 +08:00
parent 8866ec3927
commit 1fe539f1d4

View file

@ -32,7 +32,7 @@ use libc::S_IFIFO;
#[cfg(any(target_os = "linux", target_os = "android"))]
use uucore::pipes::{pipe, splice, splice_exact};
const BUF_SIZE: usize = 16 * 1024;
const BUF_SIZE: usize = 256 * 1024;
#[cfg(any(target_os = "linux", target_os = "android"))]
const SPLICE_SIZE: usize = 128 * 1024;