Skip to content

wasm: use wider loads/stores in copy_match #197

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

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

folkertdev
Copy link
Collaborator

our baseline is d913cf5

Benchmark 1 (9 runs): wasmtime target/wasm32-wasi/release/wasm-zlib-benchmark.wasm inflate miniz_oxide
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           619ms ± 3.21ms     615ms …  626ms          3 (33%)        0%
  peak_rss           82.2MB ± 2.46KB    82.2MB … 82.2MB          0 ( 0%)        0%
  cpu_cycles         2.60G  ± 6.08M     2.59G  … 2.61G           0 ( 0%)        0%
  instructions       7.05G  ±  890      7.05G  … 7.05G           0 ( 0%)        0%
  cache_references   29.0M  ±  159K     28.8M  … 29.2M           0 ( 0%)        0%
  cache_misses        895K  ± 24.3K      855K  …  925K           0 ( 0%)        0%
  branch_misses      32.7M  ± 6.52K     32.7M  … 32.7M           0 ( 0%)        0%
Benchmark 2 (13 runs): wasmtime target/wasm32-wasi/release/wasm-zlib-benchmark.wasm inflate zlib-rs
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           405ms ± 2.18ms     403ms …  410ms          0 ( 0%)        ⚡- 34.6% ±  0.4%
  peak_rss           82.2MB ± 1.14KB    82.2MB … 82.2MB          1 ( 8%)          -  0.0% ±  0.0%
  cpu_cycles         1.62G  ± 8.24M     1.61G  … 1.64G           2 (15%)        ⚡- 37.8% ±  0.3%
  instructions       5.79G  ± 1.82K     5.79G  … 5.79G           1 ( 8%)        ⚡- 17.9% ±  0.0%
  cache_references   29.1M  ±  203K     28.8M  … 29.5M           0 ( 0%)          +  0.3% ±  0.6%
  cache_misses        896K  ± 19.1K      873K  …  928K           0 ( 0%)          +  0.1% ±  2.2%
  branch_misses      13.3M  ± 6.96K     13.3M  … 13.3M           0 ( 0%)        ⚡- 59.3% ±  0.0%

The wider loads and stores of this PR help quite a bit:

Benchmark 1 (13 runs): wasmtime baseline.wasm inflate zlib-rs
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           409ms ± 5.14ms     405ms …  424ms          1 ( 8%)        0%
  peak_rss           82.2MB ± 1.80KB    82.2MB … 82.2MB          3 (23%)        0%
  cpu_cycles         1.62G  ± 11.2M     1.61G  … 1.66G           1 ( 8%)        0%
  instructions       5.79G  ± 1.26K     5.79G  … 5.79G           0 ( 0%)        0%
  cache_references   29.1M  ±  214K     28.9M  … 29.6M           0 ( 0%)        0%
  cache_misses        897K  ± 25.5K      867K  …  948K           0 ( 0%)        0%
  branch_misses      13.3M  ± 2.96K     13.3M  … 13.3M           0 ( 0%)        0%
Benchmark 2 (13 runs): wasmtime target/wasm32-wasi/release/wasm-zlib-benchmark.wasm inflate zlib-rs
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           392ms ± 1.29ms     391ms …  395ms          0 ( 0%)        ⚡-  4.1% ±  0.7%
  peak_rss           82.1MB ± 28.3KB    82.1MB … 82.2MB          3 (23%)          -  0.0% ±  0.0%
  cpu_cycles         1.55G  ± 3.08M     1.55G  … 1.56G           0 ( 0%)        ⚡-  4.3% ±  0.4%
  instructions       5.70G  ± 1.61K     5.70G  … 5.70G           1 ( 8%)        ⚡-  1.5% ±  0.0%
  cache_references   29.3M  ±  143K     29.2M  … 29.7M           2 (15%)          +  1.0% ±  0.5%
  cache_misses        873K  ± 18.6K      850K  …  916K           0 ( 0%)          -  2.7% ±  2.0%
  branch_misses      10.6M  ± 2.34K     10.6M  … 10.6M           0 ( 0%)        ⚡- 20.5% ±  0.0%

@folkertdev folkertdev merged commit 2170358 into main Sep 26, 2024
36 checks passed
@folkertdev folkertdev deleted the wasm-copy-match branch September 26, 2024 16:09
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