diff options
Diffstat (limited to 'benchmarks/benches/selfhosted.rs')
| -rw-r--r-- | benchmarks/benches/selfhosted.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/benchmarks/benches/selfhosted.rs b/benchmarks/benches/selfhosted.rs index 441923b..adac85a 100644 --- a/benchmarks/benches/selfhosted.rs +++ b/benchmarks/benches/selfhosted.rs @@ -50,21 +50,21 @@ fn run_wasmer(wasm: &[u8]) { hello.call(&mut store, &[]).expect("call"); } -const TINYWASM: &[u8] = include_bytes!("../../examples/rust/out/tinywasm.wasm"); +static TINYWASM: &[u8] = include_bytes!("../../examples/rust/out/tinywasm.opt.wasm"); fn criterion_benchmark(c: &mut Criterion) { { - let mut group = c.benchmark_group("selfhosted-parse"); - group.bench_function("tinywasm", |b| { - b.iter(|| tinywasm::Module::parse_bytes(black_box(TINYWASM)).expect("parse")) - }); + let group = c.benchmark_group("selfhosted-parse"); + // group.bench_function("tinywasm", |b| { + // b.iter(|| tinywasm::Module::parse_bytes(black_box(TINYWASM)).expect("parse")) + // }); } { - // let mut group = c.benchmark_group("selfhosted"); + let mut group = c.benchmark_group("selfhosted"); // group.bench_function("native", |b| b.iter(run_native)); - // group.bench_function("tinywasm", |b| b.iter(|| run_tinywasm(TINYWASM))); - // group.bench_function("wasmi", |b| b.iter(|| run_wasmi(TINYWASM))); - // group.bench_function("wasmer", |b| b.iter(|| run_wasmer(TINYWASM))); + group.bench_function("tinywasm", |b| b.iter(|| run_tinywasm(black_box(TINYWASM)))); + // group.bench_function("wasmi", |b| b.iter(|| run_wasmi(black_box(TINYWASM)))); + // group.bench_function("wasmer", |b| b.iter(|| run_wasmer(black_box(TINYWASM)))); } } |
