From 1fe539f1d443336af26094086ea72083a15e92cc Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 14 May 2025 14:12:35 +0800 Subject: [PATCH] wc: Increase buffer size to 256kb Improves performance by about 4% on large files. --- src/uu/wc/src/count_fast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/wc/src/count_fast.rs b/src/uu/wc/src/count_fast.rs index b79e6b0e3..450372d4d 100644 --- a/src/uu/wc/src/count_fast.rs +++ b/src/uu/wc/src/count_fast.rs @@ -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;