From 0201530c4a6ef4c84601450a50c88da76e896641 Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Sun, 27 Jan 2019 14:27:12 +0100 Subject: [PATCH] chore: Add a benchmark for compiling the lisp example fully --- benches/check.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/benches/check.rs b/benches/check.rs index 09945be2ad..f3bcf045b3 100644 --- a/benches/check.rs +++ b/benches/check.rs @@ -105,6 +105,14 @@ fn typecheck_benchmark(c: &mut Criterion) { c.bench_function("typecheck_only_24", move |b| { typecheck_file(b, "examples/24.glu") }); + + c.bench_function("compile_lisp", move |b| { + b.iter(|| { + let vm = new_vm(); + let mut compiler = Compiler::new(); + compiler.load_file(&vm, "examples/lisp/lisp.glu").unwrap() + }) + }); } criterion_group!(