Skip to content

Commit 1fe539f

Browse files
committed
wc: Increase buffer size to 256kb
Improves performance by about 4% on large files.
1 parent 8866ec3 commit 1fe539f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uu/wc/src/count_fast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use libc::S_IFIFO;
3232
#[cfg(any(target_os = "linux", target_os = "android"))]
3333
use uucore::pipes::{pipe, splice, splice_exact};
3434

35-
const BUF_SIZE: usize = 16 * 1024;
35+
const BUF_SIZE: usize = 256 * 1024;
3636
#[cfg(any(target_os = "linux", target_os = "android"))]
3737
const SPLICE_SIZE: usize = 128 * 1024;
3838

0 commit comments

Comments
 (0)