Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm: SIMD slide_hash #199

Merged
merged 1 commit into from
Sep 26, 2024
Merged

wasm: SIMD slide_hash #199

merged 1 commit into from
Sep 26, 2024

Conversation

folkertdev
Copy link
Collaborator

here we are comparing miniz_oxide at level 6 with zlib-rs at level 7. At those settings, they produce output of roughly equal size.

> wasmtime target/wasm32-wasi/release/wasm-zlib-benchmark.wasm deflate miniz_oxide
[src/main.rs:46:17] vec.len() = 6411455
> wasmtime target/wasm32-wasi/release/wasm-zlib-benchmark.wasm deflate zlib-rs
[src/main.rs:57:17] out.len() = 6416929

For these settings, our baseline is

Benchmark 1 (8 runs): wasmtime target/wasm32-wasi/release/wasm-zlib-benchmark.wasm deflate miniz_oxide
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           694ms ± 46.3ms     677ms …  809ms          1 (13%)        0%
  peak_rss           88.1MB ± 16.8MB    82.1MB …  130MB          2 (25%)        0%
  cpu_cycles         3.07G  ±  496M     2.89G  … 4.30G           1 (13%)        0%
  instructions       7.05G  ±  620M     6.83G  … 8.59G           1 (13%)        0%
  cache_references    304M  ± 29.2M      293M  …  376M           1 (13%)        0%
  cache_misses       4.63M  ± 7.78M     1.67M  … 23.9M           1 (13%)        0%
  branch_misses      19.4M  ± 3.18M     18.2M  … 27.2M           2 (25%)        0%
Benchmark 2 (11 runs): wasmtime target/wasm32-wasi/release/wasm-zlib-benchmark.wasm deflate zlib-rs
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           489ms ± 2.45ms     486ms …  494ms          0 ( 0%)        ⚡- 29.6% ±  4.2%
  peak_rss           82.2MB ± 1.23KB    82.1MB … 82.2MB          1 ( 9%)          -  6.7% ± 12.0%
  cpu_cycles         2.00G  ± 11.6M     1.99G  … 2.03G           0 ( 0%)        ⚡- 34.8% ± 10.2%
  instructions       5.56G  ± 1.85K     5.56G  … 5.56G           0 ( 0%)        ⚡- 21.2% ±  5.5%
  cache_references    171M  ± 1.27M      169M  …  173M           0 ( 0%)        ⚡- 43.9% ±  6.1%
  cache_misses       3.75M  ±  982K     2.29M  … 5.19M           0 ( 0%)          - 19.1% ± 106.9%
  branch_misses      12.3M  ± 4.03K     12.3M  … 12.3M           0 ( 0%)        ⚡- 36.5% ± 10.3%

The changes in this PR are performance-neutral for our current inputs

@folkertdev folkertdev merged commit 1567a29 into main Sep 26, 2024
18 checks passed
@folkertdev folkertdev deleted the wasm-slide-hash branch September 26, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant