Skip to content

Commit 78eee36

Browse files
committed
Use BufWriter in fasta-redux for a nice speedup
1 parent a33e487 commit 78eee36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/bench/shootout-fasta-redux.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
use std::cmp::min;
4242
use std::env;
4343
use std::io;
44+
use std::io::BufWriter;
4445
use std::io::prelude::*;
4546

4647
const LINE_LEN: usize = 60;
@@ -214,7 +215,7 @@ fn main() {
214215
};
215216

216217
let stdout = io::stdout();
217-
let mut out = stdout.lock();
218+
let mut out = BufWriter::new(stdout.lock());
218219

219220
out.write_all(b">ONE Homo sapiens alu\n").unwrap();
220221
{

0 commit comments

Comments
 (0)