instant-segment/benches/bench.rs

14 lines
411 B
Rust
Raw Normal View History

#![cfg(feature = "__test_data")]
2020-05-28 17:56:13 +00:00
use bencher::{benchmark_group, benchmark_main, Bencher};
benchmark_group!(benches, short);
benchmark_main!(benches);
fn short(bench: &mut Bencher) {
2020-12-16 09:36:38 +00:00
let segmenter = instant_segment::test_data::segmenter();
2020-11-23 12:52:51 +00:00
let mut out = Vec::new();
2021-02-10 10:48:24 +00:00
let mut search = instant_segment::Search::default();
bench.iter(|| segmenter.segment("thisisatest", &mut out, &mut search));
2020-05-28 17:56:13 +00:00
}