summaryrefslogtreecommitdiff
path: root/benches
diff options
context:
space:
mode:
Diffstat (limited to 'benches')
-rw-r--r--benches/oneshot.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/benches/oneshot.rs b/benches/oneshot.rs
index 9a57825d..a42a710d 100644
--- a/benches/oneshot.rs
+++ b/benches/oneshot.rs
@@ -44,17 +44,13 @@ fn bench_scan(iai: &mut Iai) {
}
fn bench_tokenize(iai: &mut Iai) {
- iai.run(|| {
- Tokens::new(
- black_box(&SourceFile::detached(SRC)),
- black_box(TokenMode::Markup),
- )
- .count()
- });
+ let src = SourceFile::detached(SRC);
+ iai.run(|| Tokens::new(black_box(&src), black_box(TokenMode::Markup)).count());
}
fn bench_parse(iai: &mut Iai) {
- iai.run(|| parse(&SourceFile::detached(SRC)));
+ let src = SourceFile::detached(SRC);
+ iai.run(|| parse(&src));
}
fn bench_eval(iai: &mut Iai) {