Skip to content

Commit

Permalink
reduce bufreader size from default(8kb) to 1kb
Browse files Browse the repository at this point in the history
Headers WAY less than 1kb anyway, so this can be improved more?

before

==18725== Total:     429,769,246 bytes in 957,259 blocks
==18725== At t-gmax: 8,058,316 bytes in 3,502 blocks
==18725== At t-end:  3,045,261 bytes in 1,097 blocks
==18725== Reads:     431,872,599 bytes
==18725== Writes:    214,738,653 bytes

after

==49344== Total:     201,418,575 bytes in 957,174 blocks
==49344== At t-gmax: 7,937,250 bytes in 3,310 blocks
==49344== At t-end:  3,035,637 bytes in 1,076 blocks
==49344== Reads:     431,607,448 bytes
==49344== Writes:    210,731,540 bytes
  • Loading branch information
klensy committed Jan 23, 2024
1 parent ad6432c commit e78d685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ fn iter_header_extra(

let comment = if testfile.extension().is_some_and(|e| e == "rs") { "//" } else { "#" };

let mut rdr = BufReader::new(rdr);
let mut rdr = BufReader::with_capacity(1024, rdr);
let mut ln = String::new();
let mut line_number = 0;

Expand Down

0 comments on commit e78d685

Please sign in to comment.