diff options
| author | Jack O'Connor <[email protected]> | 2025-03-17 11:06:21 -0700 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2025-03-17 11:06:21 -0700 |
| commit | 4ca3c6fb7fdecc4978c5075f89be3be8c0f38266 (patch) | |
| tree | c441e614ff279ecf145a641759d49780f53cfdbb /benches | |
| parent | 5dee0663e5918df2ceb7c5b3b4efefa92e9afb84 (diff) | |
many_chunks and many_parents benchmarks for wasm
Diffstat (limited to 'benches')
| -rw-r--r-- | benches/bench.rs | 20 |
1 files 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) { |
