From f09a62968afda4d2771a33eb45ecce8661718d7f Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Wed, 15 May 2024 17:34:11 +0200 Subject: [PATCH] ignore wasmi-v0.32 `unchecked` and `lazy-translation` configs for execution benchmarks --- src/vms/wasmi_new.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/vms/wasmi_new.rs b/src/vms/wasmi_new.rs index d4988dc..2cc5566 100644 --- a/src/vms/wasmi_new.rs +++ b/src/vms/wasmi_new.rs @@ -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, @@ -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);