Ignore criterion results from repo.

This commit is contained in:
2018-01-10 11:02:21 +01:00
parent ed35033e23
commit 86c237f75b
2 changed files with 5 additions and 5 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
/target/
Cargo.lock
/.criterion/

View File

@@ -8,12 +8,10 @@ use criterion::Criterion;
use byte_ngram::*;
fn criterion_benchmark(c: &mut Criterion) {
let data = String::from(
"Blackmail is such an ugly word. I prefer extortion. The 'x' makes it sound cool.",
);
let data = b"Blackmail is such an ugly word. I prefer extortion. The 'x' makes it sound cool.";
c.bench_function("from_slice", |b| b.iter(|| for _ in from_slice(data.as_bytes()) {}));
c.bench_function("ByteNgramReader", |b| b.iter(|| for _ in ByteNgramReader::new(data.as_bytes()) {}));
c.bench_function("from_slice", |b| b.iter(|| for _ in from_slice(&data[..]) {}));
c.bench_function("ByteNgramReader", |b| b.iter(|| for _ in ByteNgramReader::new(&data[..]) {}));
}
criterion_group!(benches, criterion_benchmark);