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

Implement support for optional fuel metering #653

Merged
merged 77 commits into from
Feb 11, 2023
Merged

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented Feb 5, 2023

Closes #643.

@paritytech-cicd-pr
Copy link

paritytech-cicd-pr commented Feb 5, 2023

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.45ms 1.47ms 🟢 0.47% 1.18ms 1.25ms 🔴 5.97% 🟢 -15%
execute/
bare_call_0/typed
1.12ms 1.06ms 🟢 -5.81% 774.84µs 788.74µs ⚪ 1.63% 🟢 -25%
execute/
bare_call_1
1.50ms 1.51ms 🟢 0.86% 1.40ms 1.48ms 🔴 5.28% 🟢 -2%
execute/
bare_call_16
2.38ms 2.34ms 🟢 -1.39% 4.28ms 4.21ms 🟢 -1.66% 🟡 80%
execute/
bare_call_16/typed
1.74ms 1.63ms 🟢 -6.55% 2.25ms 2.25ms ⚪ 0.36% 🟢 38%
execute/
bare_call_1/typed
1.24ms 1.17ms 🟢 -5.92% 1.22ms 1.26ms 🔴 2.79% 🟢 8%
execute/
bare_call_4
1.69ms 1.66ms 🟢 -2.38% 1.85ms 2.00ms 🔴 7.95% 🟢 21%
execute/
bare_call_4/typed
1.23ms 1.16ms 🟢 -5.76% 1.25ms 1.23ms ⚪ -1.23% 🟢 6%
execute/
br_table
1.25ms 1.18ms 🟢 -5.72% 1.43ms 1.45ms 🔴 1.87% 🟢 23%
execute/
count_until
651.24µs 646.61µs ⚪ -0.79% 2.14ms 1.99ms 🟢 -7.05% 🔴 208%
execute/
factorial_iterative
329.36µs 325.35µs 🟢 -1.20% 907.44µs 922.93µs ⚪ 1.28% 🔴 184%
execute/
factorial_recursive
641.67µs 646.75µs ⚪ 0.85% 1.34ms 1.36ms 🔴 1.23% 🔴 110%
execute/
fib_iterative
1.51ms 1.35ms 🟢 -10.40% 5.01ms 5.06ms ⚪ 0.89% 🔴 274%
execute/
fib_recursive
5.94ms 5.84ms 🟢 -1.66% 12.28ms 12.54ms 🔴 2.05% 🔴 115%
execute/
global_bump
963.70µs 987.10µs 🔴 2.05% 2.56ms 2.64ms 🔴 3.06% 🔴 168%
execute/
global_const
742.97µs 770.69µs ⚪ 3.30% 2.40ms 2.37ms ⚪ -1.06% 🔴 208%
execute/
host_calls
29.57µs 27.14µs 🟢 -11.12% 40.23µs 39.94µs ⚪ -0.68% 🟢 47%
execute/
memory_fill
1.31ms 1.23ms 🟢 -5.86% 4.05ms 4.24ms 🔴 4.71% 🔴 244%
execute/
memory_sum
1.30ms 1.19ms 🟢 -8.62% 4.06ms 4.13ms ⚪ 1.51% 🔴 247%
execute/
memory_vec_add
2.51ms 2.42ms 🟢 -3.75% 7.63ms 7.96ms 🔴 4.32% 🔴 230%
execute/
recursive_is_even
1.14ms 1.14ms ⚪ -0.22% 2.22ms 2.29ms 🔴 3.04% 🔴 101%
execute/
recursive_ok
152.37µs 159.98µs 🔴 4.87% 310.49µs 320.68µs 🔴 3.48% 🟡 100%
execute/
recursive_scan
181.87µs 189.14µs 🔴 4.22% 400.33µs 405.00µs ⚪ 1.68% 🔴 114%
execute/
recursive_trap
14.88µs 14.83µs ⚪ -0.40% 30.95µs 32.81µs 🔴 5.92% 🔴 121%
execute/
regex_redux
538.88µs 523.59µs 🟢 -2.84% 1.37ms 1.43ms 🔴 4.47% 🔴 173%
execute/
rev_complement
503.01µs 465.36µs 🟢 -7.53% 1.40ms 1.47ms 🔴 5.39% 🔴 217%
execute/
tiny_keccak
355.04µs 333.90µs 🟢 -6.07% 1.14ms 1.16ms 🔴 1.72% 🔴 249%
execute/
trunc_f2i
725.92µs 707.53µs 🟢 -2.54% 2.15ms 2.27ms 🔴 5.55% 🔴 221%
instantiate/
wasm_kernel
64.78µs 64.75µs ⚪ 0.57% 69.30µs 74.32µs 🔴 6.64% 🟢 15%
translate/
erc1155
209.52µs 238.63µs 🔴 13.36% 388.73µs 445.37µs 🔴 14.78% 🟡 87%
translate/
erc20
103.90µs 114.87µs 🔴 10.82% 191.65µs 216.35µs 🔴 12.82% 🟡 88%
translate/
erc721
146.20µs 162.67µs 🔴 11.27% 280.11µs 313.77µs 🔴 12.19% 🟡 93%
translate/
spidermonkey
72.44ms 0.00ns 🔴 10.70% 0.00ns 0.00ns 🔴 14.80% 🟢 0%
translate/
wasm_kernel
3.77ms 4.11ms 🔴 8.68% 7.16ms 8.09ms 🔴 12.72% 🟡 97%

Link to pipeline

@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2023

Codecov Report

Merging #653 (53cd277) into master (852f14a) will increase coverage by 0.34%.
The diff coverage is 86.85%.

@@            Coverage Diff             @@
##           master     #653      +/-   ##
==========================================
+ Coverage   80.96%   81.31%   +0.34%     
==========================================
  Files          99      100       +1     
  Lines        7905     8358     +453     
==========================================
+ Hits         6400     6796     +396     
- Misses       1505     1562      +57     
Impacted Files Coverage Δ
crates/core/src/trap.rs 53.73% <0.00%> (-0.82%) ⬇️
crates/wasmi/src/engine/cache.rs 81.81% <ø> (ø)
crates/wasmi/src/error.rs 58.62% <0.00%> (-6.77%) ⬇️
crates/wasmi/src/module/parser.rs 73.54% <ø> (+0.24%) ⬆️
crates/wasmi/src/func/caller.rs 41.66% <23.07%> (-13.89%) ⬇️
crates/wasmi/src/store.rs 76.89% <52.27%> (-5.59%) ⬇️
crates/wasmi/src/engine/executor.rs 94.89% <58.00%> (-1.93%) ⬇️
crates/wasmi/src/engine/bytecode/mod.rs 86.66% <71.42%> (-13.34%) ⬇️
crates/wasmi/src/memory/mod.rs 65.64% <80.00%> (+0.32%) ⬆️
crates/wasmi/src/engine/config.rs 68.00% <88.88%> (+4.58%) ⬆️
... and 15 more

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

@Robbepop Robbepop marked this pull request as ready for review February 10, 2023 19:20
@Robbepop Robbepop changed the title WIP: Implement support for optional fuel metering Implement support for optional fuel metering Feb 10, 2023
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.

Implement support for optional fuel metering
4 participants