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

Improve Wasmtime-like API for wasmi further #616

Merged
merged 23 commits into from
Jan 17, 2023
Merged

Improve Wasmtime-like API for wasmi further #616

merged 23 commits into from
Jan 17, 2023

Conversation

Robbepop
Copy link
Member

Follow-up for #615.

@paritytech-cicd-pr
Copy link

paritytech-cicd-pr commented Jan 17, 2023

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.41ms 1.42ms ⚪ 0.38% 1.22ms 1.13ms 🟢 -7.03% 🟢 -20%
execute/
bare_call_0/typed
1.01ms 1.02ms ⚪ 0.99% 724.97µs 729.89µs ⚪ 0.76% 🟢 -28%
execute/
bare_call_1
1.45ms 1.45ms 🟢 0.32% 1.45ms 1.45ms 🟢 -0.64% 🟢 -0%
execute/
bare_call_16
2.54ms 2.40ms 🟢 -5.23% 4.10ms 4.12ms ⚪ 0.51% 🟡 72%
execute/
bare_call_16/typed
1.59ms 1.58ms ⚪ -0.88% 2.30ms 2.30ms ⚪ -0.16% 🟢 45%
execute/
bare_call_1/typed
1.10ms 1.10ms ⚪ 0.51% 1.08ms 1.06ms 🟢 -1.81% 🟢 -4%
execute/
bare_call_4
1.64ms 1.69ms 🔴 2.43% 1.94ms 1.95ms ⚪ 0.86% 🟢 16%
execute/
bare_call_4/typed
1.12ms 1.12ms ⚪ 0.30% 1.11ms 1.10ms ⚪ -0.23% 🟢 -2%
execute/
br_table
1.10ms 1.15ms 🔴 4.10% 1.28ms 1.31ms 🔴 2.61% 🟢 14%
execute/
count_until
716.43µs 651.20µs 🟢 -9.39% 2.24ms 2.25ms ⚪ 0.71% 🔴 245%
execute/
factorial_iterative
325.33µs 335.08µs 🔴 2.89% 908.99µs 901.17µs ⚪ -0.65% 🔴 169%
execute/
factorial_recursive
644.34µs 645.59µs ⚪ 0.18% 1.36ms 1.36ms ⚪ 0.15% 🔴 111%
execute/
fib_iterative
1.43ms 1.45ms 🔴 1.45% 4.68ms 4.69ms ⚪ 0.28% 🔴 223%
execute/
fib_recursive
5.74ms 5.85ms 🔴 2.02% 12.22ms 12.32ms ⚪ 0.74% 🔴 111%
execute/
global_bump
1.02ms 1.05ms 🔴 3.06% 3.32ms 3.35ms ⚪ 1.01% 🔴 220%
execute/
global_const
719.75µs 743.81µs 🔴 3.30% 2.58ms 2.59ms ⚪ 0.35% 🔴 249%
execute/
host_calls
29.21µs 28.94µs ⚪ -1.00% 42.39µs 41.13µs 🟢 -2.99% 🟢 42%
execute/
memory_fill
1.30ms 1.25ms 🟢 -4.13% 3.98ms 3.98ms ⚪ 0.16% 🔴 219%
execute/
memory_sum
1.30ms 1.22ms 🟢 -5.77% 3.94ms 3.93ms ⚪ -0.16% 🔴 222%
execute/
memory_vec_add
2.55ms 2.54ms ⚪ -0.51% 8.18ms 8.15ms ⚪ -0.24% 🔴 221%
execute/
recursive_is_even
1.14ms 1.19ms 🔴 3.77% 2.22ms 2.22ms ⚪ 0.05% 🟡 86%
execute/
recursive_ok
147.96µs 147.18µs ⚪ -0.54% 312.81µs 310.29µs ⚪ -0.81% 🔴 111%
execute/
recursive_scan
179.98µs 178.23µs ⚪ -1.08% 405.08µs 404.07µs ⚪ -0.09% 🔴 127%
execute/
recursive_trap
14.46µs 14.37µs ⚪ -0.52% 31.51µs 31.72µs ⚪ 0.61% 🔴 121%
execute/
regex_redux
544.74µs 533.46µs 🟢 -2.07% 1.49ms 1.47ms 🟢 -1.26% 🔴 176%
execute/
rev_complement
488.72µs 489.41µs ⚪ 0.24% 1.43ms 1.42ms ⚪ -0.78% 🔴 189%
execute/
tiny_keccak
360.86µs 360.38µs ⚪ 0.00% 1.17ms 1.17ms ⚪ -0.45% 🔴 224%
execute/
trunc_f2i
906.38µs 906.53µs ⚪ 0.02% 2.51ms 2.50ms ⚪ -0.08% 🔴 176%
instantiate/
wasm_kernel
64.77µs 64.70µs 🟢 -4.19% 106.42µs 83.09µs 🟢 -21.51% 🟢 28%
translate/
erc1155
209.81µs 211.62µs ⚪ 0.77% 403.94µs 409.20µs ⚪ 1.28% 🟡 93%
translate/
erc20
101.87µs 105.18µs 🔴 3.15% 196.88µs 201.09µs 🔴 2.31% 🟡 91%
translate/
erc721
147.63µs 150.29µs 🔴 1.83% 287.47µs 290.82µs ⚪ 1.16% 🟡 94%
translate/
spidermonkey
0.00ns 0.00ns ⚪ -1.14% 0.00ns 0.00ns ⚪ 0.11% 🟢 0%
translate/
wasm_kernel
3.85ms 3.88ms ⚪ 0.70% 7.64ms 7.65ms ⚪ -0.03% 🟡 97%

Link to pipeline

@codecov-commenter
Copy link

Codecov Report

Merging #616 (a09e8a5) into master (b9168b0) will increase coverage by 0.10%.
The diff coverage is 73.27%.

@@            Coverage Diff             @@
##           master     #616      +/-   ##
==========================================
+ Coverage   80.44%   80.55%   +0.10%     
==========================================
  Files          83       83              
  Lines        6920     6907      -13     
==========================================
- Hits         5567     5564       -3     
+ Misses       1353     1343      -10     
Impacted Files Coverage Δ
crates/cli/src/main.rs 0.00% <0.00%> (ø)
crates/wasmi/src/engine/executor.rs 97.83% <0.00%> (-0.16%) ⬇️
crates/wasmi/src/external.rs 59.25% <0.00%> (ø)
crates/wasmi/src/module/instantiate/error.rs 0.00% <ø> (ø)
crates/wasmi/src/global.rs 48.00% <60.00%> (+3.55%) ⬆️
crates/wasmi/src/table.rs 50.49% <60.86%> (-0.49%) ⬇️
crates/wasmi/src/module/instantiate/mod.rs 79.59% <90.90%> (+1.21%) ⬆️
crates/core/src/value.rs 62.31% <100.00%> (ø)
crates/wasmi/src/engine/func_builder/mod.rs 89.93% <100.00%> (ø)
crates/wasmi/src/engine/mod.rs 81.44% <100.00%> (ø)
... and 13 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Robbepop Robbepop merged commit 3b89bfd into master Jan 17, 2023
@Robbepop Robbepop deleted the rf-ty-getters branch January 17, 2023 18:16
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.

3 participants