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

Refactor wasmi_core::Trap and make it more similar to Wasmtime's Trap #559

Merged
merged 24 commits into from Nov 7, 2022

Conversation

Robbepop
Copy link
Collaborator

@Robbepop Robbepop commented Nov 7, 2022

Closes #517.
Unblocks #557.

2022-11-07-123148_1196x1097_scrot

@paritytech-cicd-pr
Copy link

paritytech-cicd-pr commented Nov 7, 2022

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.25ms 1.20ms 🟢 -3.35% 926.24µs 884.08µs 🟢 -4.53% 🟢 -27%
execute/
bare_call_0/typed
645.52µs 640.69µs ⚪ -0.94% 396.14µs 399.24µs ⚪ 0.91% 🟢 -38%
execute/
bare_call_1
1.34ms 1.34ms 🟢 0.00% 1.14ms 1.07ms 🟢 -6.26% 🟢 -20%
execute/
bare_call_16
2.83ms 2.83ms ⚪ -0.18% 4.76ms 4.76ms 🟢 -0.03% 🟡 68%
execute/
bare_call_16/typed
1.37ms 1.36ms ⚪ -0.35% 2.16ms 2.02ms 🟢 -6.65% 🟢 49%
execute/
bare_call_1/typed
824.46µs 758.56µs 🟢 -7.86% 685.45µs 682.28µs ⚪ -0.43% 🟢 -10%
execute/
bare_call_4
1.63ms 1.64ms ⚪ 0.44% 1.72ms 1.71ms 🟢 -0.96% 🟢 4%
execute/
bare_call_4/typed
860.71µs 858.56µs ⚪ -0.32% 835.16µs 812.29µs 🟢 -2.72% 🟢 -5%
execute/
br_table
826.25µs 795.46µs ⚪ -3.31% 896.95µs 907.91µs ⚪ 1.50% 🟢 14%
execute/
count_until
773.13µs 772.69µs ⚪ 0.00% 2.05ms 2.06ms ⚪ 0.24% 🔴 166%
execute/
factorial_iterative
338.26µs 338.77µs ⚪ 0.02% 843.01µs 849.97µs ⚪ 0.92% 🔴 151%
execute/
factorial_recursive
674.35µs 677.18µs ⚪ 0.49% 1.26ms 1.25ms 🟢 -1.34% 🟡 84%
execute/
fib_iterative
1.67ms 1.68ms ⚪ 2.11% 4.49ms 4.48ms ⚪ -0.34% 🔴 167%
execute/
fib_recursive
6.59ms 6.60ms ⚪ 0.16% 12.51ms 12.46ms ⚪ -0.27% 🟡 89%
execute/
global_bump
1.17ms 1.18ms ⚪ 0.12% 3.15ms 3.11ms ⚪ -1.25% 🔴 164%
execute/
global_const
878.97µs 880.23µs ⚪ 0.06% 2.31ms 2.31ms ⚪ -0.23% 🔴 162%
execute/
host_calls
31.86µs 31.57µs ⚪ -0.43% 35.65µs 35.50µs ⚪ -0.53% 🟢 12%
execute/
memory_fill
1.50ms 1.53ms 🔴 2.04% 3.92ms 3.93ms ⚪ 0.62% 🔴 157%
execute/
memory_sum
1.53ms 1.49ms 🟢 -2.81% 3.90ms 3.89ms ⚪ 0.06% 🔴 161%
execute/
memory_vec_add
3.15ms 3.13ms ⚪ -0.53% 8.15ms 8.31ms 🔴 1.77% 🔴 165%
execute/
recursive_is_even
1.25ms 1.24ms ⚪ -1.24% 2.09ms 2.11ms ⚪ 1.00% 🟡 70%
execute/
recursive_ok
164.25µs 164.68µs ⚪ 0.01% 300.16µs 292.52µs 🟢 -2.53% 🟡 78%
execute/
recursive_scan
199.20µs 199.04µs ⚪ -0.17% 377.79µs 368.61µs 🟢 -2.33% 🟡 85%
execute/
recursive_trap
16.10µs 16.10µs ⚪ -0.20% 30.55µs 28.24µs 🟢 -7.33% 🟡 75%
execute/
regex_redux
686.20µs 661.40µs 🟢 -3.72% 1.43ms 1.40ms 🟢 -1.66% 🔴 111%
execute/
rev_complement
609.24µs 609.66µs ⚪ 0.27% 1.39ms 1.39ms ⚪ 0.04% 🔴 129%
execute/
tiny_keccak
463.55µs 456.45µs ⚪ -1.16% 1.16ms 1.15ms ⚪ -0.48% 🔴 152%
execute/
trunc_f2i
1.10ms 1.09ms ⚪ -0.83% 2.38ms 2.37ms ⚪ -0.35% 🔴 117%
instantiate/
wasm_kernel
72.20µs 72.88µs ⚪ 0.52% 67.48µs 67.20µs ⚪ 0.03% 🟢 -8%
translate/
erc1155
242.34µs 243.33µs ⚪ 0.53% 379.39µs 379.13µs ⚪ -0.18% 🟡 56%
translate/
erc20
119.66µs 119.12µs ⚪ -0.04% 183.57µs 186.06µs ⚪ 1.23% 🟡 56%
translate/
erc721
169.60µs 170.68µs ⚪ 0.45% 267.80µs 268.26µs ⚪ 0.35% 🟡 57%
translate/
spidermonkey
0.00ns 0.00ns 🔴 1.39% 0.00ns 0.00ns ⚪ -0.35% 🟢 0%
translate/
wasm_kernel
4.13ms 4.15ms ⚪ -0.04% 7.10ms 7.11ms ⚪ -0.24% 🟡 71%

Link to pipeline

This restores performance of wasmi.
@Robbepop Robbepop merged commit 53eac5c into master Nov 7, 2022
@Robbepop Robbepop deleted the rf-refactor-wasmi-trap branch November 7, 2022 12: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.

Make Trap more similar to wasmtime::Trap
2 participants