From 1619cd5afe917ea9f75c37b6da6eaabd7bbef29a Mon Sep 17 00:00:00 2001 From: Lily Ballard Date: Fri, 11 Jan 2019 21:32:55 -0800 Subject: [PATCH] Bump the buffer size to 256 bytes On my machine this produces an 11% speedup (benchmarked reading a 1.3MB file from disk). Higher buffer sizes don't seem to make a difference. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e45f998..30c42dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ use clap::{App, AppSettings, Arg}; use ansi_term::Colour; use ansi_term::Colour::Fixed; -const BUFFER_SIZE: usize = 64; +const BUFFER_SIZE: usize = 256; const COLOR_NULL: Colour = Fixed(242); // grey const COLOR_OFFSET: Colour = Fixed(242); // grey