about summary refs log tree commit diff
path: root/tvix/eval/benches
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/benches')
-rw-r--r--tvix/eval/benches/eval.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tvix/eval/benches/eval.rs b/tvix/eval/benches/eval.rs
new file mode 100644
index 000000000000..a97adf02db50
--- /dev/null
+++ b/tvix/eval/benches/eval.rs
@@ -0,0 +1,9 @@
+use criterion::{black_box, criterion_group, criterion_main, Criterion};
+use tvix_eval::interpret;
+
+fn eval_literals(c: &mut Criterion) {
+    c.bench_function("int", |b| b.iter(|| black_box(interpret("42"))));
+}
+
+criterion_group!(benches, eval_literals);
+criterion_main!(benches);