Stream: git-wasmtime

Topic: wasmtime / PR #6981 Add component call micro-benchmarks


view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2023 at 18:01):

fitzgen opened PR #6981 from fitzgen:component-call-micro-benchmarks to bytecodealliance:main:

This commit adds the component equivalents of the existing core Wasm call micro-benchmarks. This also adds a sprinkling of #[inline] to some functions that I noticed when glancing at some profiles.

The two most important numbers:

sync/no-hook/component - host-to-wasm - typed - nop
                        time:   [75.849 ns 76.476 ns 77.247 ns]

sync/no-hook/component - wasm-to-host - typed - nop
                        time:   [33.614 ns 33.872 ns 34.170 ns]

The full benchmark results are in here:

<details>

$ cargo bench --features component-model --bench call 'component'
    Finished bench [optimized] target(s) in 0.19s
     Running benches/call.rs (target/release/deps/call-4d8d1585dd2825a2)
sync/no-hook/component - host-to-wasm - typed - nop
                        time:   [75.849 ns 76.476 ns 77.247 ns]
Found 5 outliers among 100 measurements (5.00%)
  1 (1.00%) high mild
  4 (4.00%) high severe
sync/no-hook/component - host-to-wasm - untyped - nop
                        time:   [108.29 ns 109.66 ns 111.51 ns]
Found 7 outliers among 100 measurements (7.00%)
  2 (2.00%) high mild
  5 (5.00%) high severe
sync/no-hook/component - host-to-wasm - typed - nop-params-and-results
                        time:   [79.968 ns 80.756 ns 81.728 ns]
Found 5 outliers among 100 measurements (5.00%)
  5 (5.00%) high severe
sync/no-hook/component - host-to-wasm - untyped - nop-params-and-results
                        time:   [210.27 ns 211.72 ns 213.34 ns]
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) high mild
  3 (3.00%) high severe

sync/hook-sync/component - host-to-wasm - typed - nop
                        time:   [76.840 ns 77.295 ns 77.770 ns]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe
sync/hook-sync/component - host-to-wasm - untyped - nop
                        time:   [109.63 ns 110.42 ns 111.26 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
sync/hook-sync/component - host-to-wasm - typed - nop-params-and-results
                        time:   [81.324 ns 82.344 ns 83.663 ns]
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe
sync/hook-sync/component - host-to-wasm - untyped - nop-params-and-results
                        time:   [211.84 ns 215.06 ns 219.22 ns]
Found 8 outliers among 100 measurements (8.00%)
  4 (4.00%) high mild
  4 (4.00%) high severe

async/no-hook/component - host-to-wasm - typed - nop
                        time:   [23.759 µs 23.969 µs 24.221 µs]
Found 11 outliers among 100 measurements (11.00%)
  1 (1.00%) high mild
  10 (10.00%) high severe
async/no-hook/component - host-to-wasm - untyped - nop
                        time:   [23.941 µs 24.093 µs 24.254 µs]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe
async/no-hook/component - host-to-wasm - typed - nop-params-and-results
                        time:   [24.286 µs 24.459 µs 24.629 µs]
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe
async/no-hook/component - host-to-wasm - untyped - nop-params-and-results
                        time:   [24.258 µs 24.390 µs 24.528 µs]
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe

async/hook-sync/component - host-to-wasm - typed - nop
                        time:   [24.055 µs 24.224 µs 24.408 µs]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
async/hook-sync/component - host-to-wasm - untyped - nop
                        time:   [24.217 µs 24.364 µs 24.517 µs]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high severe
async/hook-sync/component - host-to-wasm - typed - nop-params-and-results
                        time:   [24.207 µs 24.331 µs 24.463 µs]
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe
async/hook-sync/component - host-to-wasm - untyped - nop-params-and-results
                        time:   [24.607 µs 24.767 µs 24.936 µs]
Found 6 outliers among 100 measurements (6.00%)
  4 (4.00%) high mild
  2 (2.00%) high severe

async-pool/no-hook/component - host-to-wasm - typed - nop
                        time:   [456.89 ns 459.65 ns 462.68 ns]
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe
async-pool/no-hook/component - host-to-wasm - untyped - nop
                        time:   [490.07 ns 492.87 ns 495.88 ns]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
async-pool/no-hook/component - host-to-wasm - typed - nop-params-and-results
                        time:   [471.68 ns 475.01 ns 478.59 ns]
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe
async-pool/no-hook/component - host-to-wasm - untyped - nop-params-and-results
                        time:   [597.02 ns 600.61 ns 604.53 ns]
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe

async-pool/hook-sync/component - host-to-wasm - typed - nop
                        time:   [458.06 ns 460.82 ns 463.77 ns]
Found 6 outliers among 100 measurements (6.00%)
  6 (6.00%) high severe
async-pool/hook-sync/component - host-to-wasm - untyped - nop
                        time:   [494.20 ns 497.65 ns 501.48 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high severe
async-pool/hook-sync/component - host-to-wasm - typed - nop-params-and-results
                        time:   [472.40 ns 476.08 ns 480.10 ns]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high severe
async-pool/hook-sync/component - host-to-wasm - untyped - nop-params-and-results
                        time:   [598.55 ns 603.79 ns 610.18 ns]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

sync/no-hook/component - wasm-to-host - typed - nop
                        time:   [33.614 ns 33.872 ns 34.170 ns]
Found 9 outliers among 100 measurements (9.00%)
  1 (1.00%) high mild
  8 (8.00%) high severe
sync/no-hook/component - wasm-to-host - typed - nop-params-and-results
                        time:   [37.416 ns 37.700 ns 38.002 ns]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe
sync/no-hook/component - wasm-to-host - untyped - nop
                        time:   [58.126 ns 58.478 ns 58.846 ns]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
sync/no-hook/component - wasm-to-host - untyped - nop-params-and-results
                        time:   [170.14 ns 171.33 ns 172.68 ns]
Found 5 outliers among 100 measurements (5.00%)
  3 (3.00%) high mild
  2 (2.00%) high severe

sync/hook-sync/component - wasm-to-host - typed - nop
                        time:   [33.336 ns 33.556 ns 33.796 ns]
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe
sync/hook-sync/component - wasm-to-host - typed - nop-params-and-results
                        time:   [37.399 ns 37.654 ns 37.904 ns]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
sync/hook-sync/component - wasm-to-host - untyped - nop
                        time:   [58.438 ns 58.924 ns 59.485 ns]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe
sync/hook-sync/component - wasm-to-host - untyped - nop-params-and-results
                        time:   [169.36 ns 170.44 ns 171.60 ns]
Found 8 outliers among 100 measurements (8.00%)
  4 (4.00%) high mild
  4 (4.00%) high severe

async/no-hook/component - wasm-to-host - typed - nop
                        time:   [33.882 ns 34.198 ns 34.573 ns]
Found 11 outliers among 100 measurements (11.00%)
  6 (6.00%) high mild
  5 (5.00%) high severe
async/no-hook/component - wasm-to-host - typed - nop-params-and-results
                        time:   [37.407 ns 37.820 ns 38.371 ns]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe
async/no-hook/component - wasm-to-host - untyped - nop
                        time:   [58.400 ns 58.937 ns 59.537 ns]
Found 6 outliers among 100 measurements (6.00%)
  4 (4.00%) high mild
  2 (2.00%) high severe
async/no-hook/component - wasm-to-host - untyped - nop-params-and-results
                        time:   [170.15 ns 171.72 ns 173.52 ns]
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) high mild
  3 (3.00%) high severe
async/no-hook/component - wasm-to-host - async-typed - nop
                        time:   [48.383 ns 48.801 ns 49.317 ns]
Found 5 outliers among 100 measurements (5.00%)
  4 (4.00%) high mild
  1 (1.00%) high severe
async/no-hook/component - wasm-to-host - async-typed - nop-params-and-results
                        time:   [59.723 ns 60.158 ns 60.657 ns]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

async/hook-sync/component - wasm-to-host - typed - nop
                        time:   [33.537 ns 34.056 ns 34.742 ns]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe
async/hook-sync/component - wasm-to-host - typed - nop-params-and-results
                        time:   [37.390 ns 37.888 ns 38.562 ns]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe
async/hook-sync/component - wasm-to-host - untyped - nop

[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2023 at 18:01):

fitzgen requested pchickey for a review on PR #6981.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2023 at 18:01):

fitzgen requested wasmtime-core-reviewers for a review on PR #6981.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2023 at 18:01):

fitzgen requested wasmtime-default-reviewers for a review on PR #6981.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2023 at 22:26):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 09 2023 at 18:08):

alexcrichton merged PR #6981.


Last updated: Dec 23 2024 at 12:05 UTC