Ignore criterion results from repo.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
/target/
|
/target/
|
||||||
|
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
|
||||||
|
/.criterion/
|
||||||
|
|||||||
@@ -8,12 +8,10 @@ use criterion::Criterion;
|
|||||||
use byte_ngram::*;
|
use byte_ngram::*;
|
||||||
|
|
||||||
fn criterion_benchmark(c: &mut Criterion) {
|
fn criterion_benchmark(c: &mut Criterion) {
|
||||||
let data = String::from(
|
let data = b"Blackmail is such an ugly word. I prefer extortion. The 'x' makes it sound cool.";
|
||||||
"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("from_slice", |b| b.iter(|| for _ in from_slice(&data[..]) {}));
|
||||||
c.bench_function("ByteNgramReader", |b| b.iter(|| for _ in ByteNgramReader::new(data.as_bytes()) {}));
|
c.bench_function("ByteNgramReader", |b| b.iter(|| for _ in ByteNgramReader::new(&data[..]) {}));
|
||||||
}
|
}
|
||||||
|
|
||||||
criterion_group!(benches, criterion_benchmark);
|
criterion_group!(benches, criterion_benchmark);
|
||||||
|
|||||||
Reference in New Issue
Block a user