From 7c3fd68f703d944b05dcea08f3a46c59b41503f4 Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Thu, 30 May 2024 01:16:56 +0200 Subject: chore: cleanup Signed-off-by: Henry Gressmann --- benchmarks/benches/fibonacci.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'benchmarks/benches/fibonacci.rs') diff --git a/benchmarks/benches/fibonacci.rs b/benchmarks/benches/fibonacci.rs index 61b9a68..e610ab2 100644 --- a/benchmarks/benches/fibonacci.rs +++ b/benchmarks/benches/fibonacci.rs @@ -44,7 +44,7 @@ fn run_native_recursive(n: i32) -> i32 { run_native_recursive(n - 1) + run_native_recursive(n - 2) } -const FIBONACCI: &[u8] = include_bytes!("../../examples/rust/out/fibonacci.wasm"); +static FIBONACCI: &[u8] = include_bytes!("../../examples/rust/out/fibonacci.opt.wasm"); fn criterion_benchmark(c: &mut Criterion) { // { // let mut group = c.benchmark_group("fibonacci"); @@ -58,7 +58,9 @@ fn criterion_benchmark(c: &mut Criterion) { let mut group = c.benchmark_group("fibonacci-recursive"); group.measurement_time(std::time::Duration::from_secs(5)); // group.bench_function("native", |b| b.iter(|| run_native_recursive(black_box(26)))); - group.bench_function("tinywasm", |b| b.iter(|| run_tinywasm(FIBONACCI, black_box(26), "fibonacci_recursive"))); + group.bench_function("tinywasm", |b| { + b.iter(|| run_tinywasm(black_box(FIBONACCI), black_box(26), "fibonacci_recursive")) + }); // group.bench_function("wasmi", |b| b.iter(|| run_wasmi(FIBONACCI, black_box(26), "fibonacci_recursive"))); // group.bench_function("wasmer", |b| b.iter(|| run_wasmer(FIBONACCI, black_box(26), "fibonacci_recursive"))); } -- cgit v1.3.1