summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorRyan Geary <rtgnj42@gmail.com>2020-02-24 23:59:51 -0500
committerRyan Geary <rtgnj42@gmail.com>2020-03-10 00:03:14 -0400
commit389c29822b2af5f4a828734eb0a2d70b4f82a900 (patch)
tree7983809185cf846c2182f0eac89654359860d91a /src/main.rs
parentc729ad3f004eb2313a4dfa206b7103939abeaac4 (diff)
Improve performance and add profiling tooling
Add tags, todo, *.bench, *.svg and bench_output to .gitignore Add test/bench.sh script. bench.sh runs the `bench` command on each test/long*txt file with range 3:5 and saves the output to a file for comparing performance across file sizes. Inline printing in get_choice_slice Change BufWriter<..stdout..> to BufWriter<T> Add MockStdout for testing printing Add more reverse range tests Simplify word finding with a more uniform bounds check. Add Makefile for generating flamegraphs Redefine Choice struct as a start and end integer Improve algorithm for finding words to print Settle exclusivity at Config construction time Add tests for nonexistant field_seps Add regression test for preceding separator Use handle.write instead of write! macro for tremendous speed up
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 1050950..51f1b1f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -28,7 +28,7 @@ fn main() {
for choice in &config.opt.choice {
choice.print_choice(&l, &config, &mut handle);
}
- writeln!(handle, "");
+ handle.write(b"\n").unwrap();
}
Err(e) => println!("ERROR: {}", e),
}