Skip to content

Commit

Permalink
chore: upgrade dev-dependencies (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwshang committed Jul 3, 2024
1 parent 1bace0e commit 60845e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ gimli = "0.26.0"
parallel = ['rayon', 'id-arena/rayon']

[dev-dependencies]
env_logger = "0.8.1"
criterion = "0.3.0"
env_logger = "0.11.0"
criterion = "0.5.0"

[workspace]
members = [
Expand Down
26 changes: 12 additions & 14 deletions benches/benches.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
use criterion::{black_box, criterion_group, criterion_main, Benchmark, Criterion};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use walrus::Module;

fn criterion_benchmark(c: &mut Criterion) {
c.bench(
"round-trip-with-gc",
Benchmark::new("dodrio-todomvc.wasm", |b| {
let input_wasm = include_bytes!("./fixtures/dodrio-todomvc.wasm");
b.iter(|| {
let input_wasm = black_box(input_wasm);
let mut module = Module::from_buffer(input_wasm).unwrap();
walrus::passes::gc::run(&mut module);
let output_wasm = module.emit_wasm();
black_box(output_wasm);
});
}),
);
let mut group = c.benchmark_group("round-trip-with-gc");
group.bench_function("dodrio-todomvc.wasm", |b| {
let input_wasm = include_bytes!("./fixtures/dodrio-todomvc.wasm");
b.iter(|| {
let input_wasm = black_box(input_wasm);
let mut module = Module::from_buffer(input_wasm).unwrap();
walrus::passes::gc::run(&mut module);
let output_wasm = module.emit_wasm();
black_box(output_wasm);
});
});
}

criterion_group!(benches, criterion_benchmark);
Expand Down

0 comments on commit 60845e7

Please sign in to comment.