Skip to content

Commit

Permalink
ignore wasmi-v0.32 unchecked and lazy-translation configs for exe…
Browse files Browse the repository at this point in the history
…cution benchmarks
  • Loading branch information
Robbepop committed May 15, 2024
1 parent 5a83cf7 commit f09a629
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/vms/wasmi_new.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::{ExecuteTestFilter, TestFilter};
use super::{elapsed_ms, BenchRuntime, BenchVm};
use wasmi_new::ModuleImportsIter;
use wasmi_new::{CompilationMode, ModuleImportsIter};

pub struct WasmiNew {
pub compilation_mode: wasmi_new::CompilationMode,
Expand Down Expand Up @@ -38,6 +39,21 @@ impl BenchVm for WasmiNew {
}
}

fn test_filter(&self) -> TestFilter {
// We are not interested in `unchecked` or `lazy-translation` execution benchmarks
// since we do not expect them to have significantly different behavior compared to
// `eager.checked` and `lazy.checked`.
let execute = matches!(self.validation, Validation::Checked)
&& matches!(
self.compilation_mode,
CompilationMode::Eager | CompilationMode::Lazy
);
TestFilter {
execute: ExecuteTestFilter::set_to(execute),
..TestFilter::set_to(true)
}
}

fn compile(&self, wasm: &[u8], _imports: ModuleImportsIter) {
let store = self.store();
self.module(store.engine(), wasm);
Expand Down

0 comments on commit f09a629

Please sign in to comment.