From 4ca3c6fb7fdecc4978c5075f89be3be8c0f38266 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Mon, 17 Mar 2025 11:06:21 -0700 Subject: many_chunks and many_parents benchmarks for wasm --- benches/bench.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/benches/bench.rs b/benches/bench.rs index dd9f498..94c4bb2 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -146,9 +146,13 @@ fn bench_many_chunks_avx512(b: &mut Bencher) { #[bench] #[cfg(feature = "neon")] fn bench_many_chunks_neon(b: &mut Bencher) { - if let Some(platform) = Platform::neon() { - bench_many_chunks_fn(b, platform); - } + bench_many_chunks_fn(b, Platform::neon().unwrap()); +} + +#[bench] +#[cfg(feature = "wasm32_simd")] +fn bench_many_chunks_wasm(b: &mut Bencher) { + bench_many_chunks_fn(b, Platform::wasm32_simd().unwrap()); } // TODO: When we get const generics we can unify this with the chunks code. @@ -213,9 +217,13 @@ fn bench_many_parents_avx512(b: &mut Bencher) { #[bench] #[cfg(feature = "neon")] fn bench_many_parents_neon(b: &mut Bencher) { - if let Some(platform) = Platform::neon() { - bench_many_parents_fn(b, platform); - } + bench_many_parents_fn(b, Platform::neon().unwrap()); +} + +#[bench] +#[cfg(feature = "wasm32_simd")] +fn bench_many_parents_wasm(b: &mut Bencher) { + bench_many_parents_fn(b, Platform::wasm32_simd().unwrap()); } fn bench_atonce(b: &mut Bencher, len: usize) { -- cgit v1.2.3