about summary refs log tree commit diff
path: root/tvix/eval/benches/eval.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/benches/eval.rs')
-rw-r--r--tvix/eval/benches/eval.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/tvix/eval/benches/eval.rs b/tvix/eval/benches/eval.rs
index 006038490df4..f85e3585f017 100644
--- a/tvix/eval/benches/eval.rs
+++ b/tvix/eval/benches/eval.rs
@@ -2,23 +2,23 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion};
 use itertools::Itertools;
 
 fn interpret(code: &str) {
-    tvix_eval::Evaluation::new(code).evaluate()
+    tvix_eval::Evaluation::new(code, None).evaluate();
 }
 
 fn eval_literals(c: &mut Criterion) {
     c.bench_function("int", |b| {
-        b.iter(|| black_box(interpret("42", None, Default::default())))
+        b.iter(|| {
+            interpret("42");
+            black_box(())
+        })
     });
 }
 
 fn eval_merge_attrs(c: &mut Criterion) {
     c.bench_function("merge small attrs", |b| {
         b.iter(|| {
-            black_box(interpret(
-                "{ a = 1; b = 2; } // { c = 3; }",
-                None,
-                Default::default(),
-            ))
+            interpret("{ a = 1; b = 2; } // { c = 3; }");
+            black_box(())
         })
     });
 
@@ -28,7 +28,10 @@ fn eval_merge_attrs(c: &mut Criterion) {
             (0..10000).map(|n| format!("a{n} = {n};")).join(" ")
         );
         let expr = format!("{large_attrs} // {{ c = 3; }}");
-        b.iter(move || black_box(interpret(&expr, None, Default::default())))
+        b.iter(move || {
+            interpret(&expr);
+            black_box(())
+        })
     });
 }