summaryrefslogtreecommitdiff
path: root/benchmarks/benches/selfhosted.rs
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2024-05-30 01:16:56 +0200
committerHenry Gressmann <mail@henrygressmann.de>2024-05-30 01:16:56 +0200
commit7c3fd68f703d944b05dcea08f3a46c59b41503f4 (patch)
tree4588645c28ea9775ae39f4875b019f72269dbb6f /benchmarks/benches/selfhosted.rs
parentffb1e095fc1d6a2d54cc7637797c625dee6ebe6a (diff)
chore: cleanup
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'benchmarks/benches/selfhosted.rs')
-rw-r--r--benchmarks/benches/selfhosted.rs18
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))));
}
}