Skip to content

Add fuel consumption modes#706

Merged
Robbepop merged 40 commits intomasterfrom
rf-fuel-consumption-modes
Mar 6, 2023
Merged

Add fuel consumption modes#706
Robbepop merged 40 commits intomasterfrom
rf-fuel-consumption-modes

Conversation

@Robbepop
Copy link
Member

@Robbepop Robbepop commented Mar 3, 2023

Closes #702.

@paritytech-cicd-pr
Copy link

paritytech-cicd-pr commented Mar 3, 2023

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.48ms 1.62ms 🔴 8.96% 1.33ms 1.35ms ⚪ 1.00% 🟢 -17%
execute/
bare_call_0/typed
1.13ms 1.13ms ⚪ 0.11% 997.67µs 989.19µs ⚪ -0.90% 🟢 -13%
execute/
bare_call_1
1.55ms 1.55ms 🔴 -0.32% 1.41ms 1.41ms 🟢 0.00% 🟢 -9%
execute/
bare_call_16
2.47ms 2.48ms ⚪ 0.44% 3.42ms 3.46ms 🟢 0.95% 🟢 40%
execute/
bare_call_16/typed
1.79ms 1.78ms ⚪ -0.02% 1.82ms 1.69ms 🟢 -6.98% 🟢 -5%
execute/
bare_call_1/typed
1.20ms 1.23ms 🔴 2.35% 1.32ms 1.25ms 🟢 -5.57% 🟢 2%
execute/
bare_call_4
1.74ms 1.76ms ⚪ 1.10% 1.83ms 1.75ms 🟢 -4.03% 🟢 -1%
execute/
bare_call_4/typed
1.26ms 1.26ms ⚪ 0.12% 1.27ms 1.24ms 🟢 -2.29% 🟢 -2%
execute/
br_table
1.30ms 1.29ms ⚪ -0.69% 1.39ms 1.40ms ⚪ 0.63% 🟢 8%
execute/
count_until
900.34µs 679.40µs 🟢 -24.54% 1.15ms 1.19ms 🔴 3.48% 🟡 76%
execute/
factorial_iterative
389.34µs 336.09µs 🟢 -13.64% 507.21µs 469.35µs 🟢 -7.61% 🟢 40%
execute/
factorial_recursive
602.46µs 668.26µs 🔴 10.85% 885.13µs 872.96µs ⚪ -0.71% 🟢 31%
execute/
fibonacci_iter
1.46ms 1.47ms ⚪ 0.51% 2.48ms 2.16ms 🟢 -12.78% 🟢 47%
execute/
fibonacci_rec
4.78ms 4.79ms ⚪ 0.19% 7.40ms 7.64ms 🔴 3.28% 🟡 60%
execute/
fibonacci_tail
1.18ms 1.17ms ⚪ -0.74% 1.64ms 1.64ms ⚪ -0.34% 🟢 41%
execute/
global_bump
826.81µs 799.98µs 🟢 -2.72% 1.55ms 1.51ms 🟢 -2.14% 🟡 89%
execute/
global_const
804.33µs 713.83µs 🟢 -11.22% 1.33ms 1.38ms 🔴 3.50% 🟡 93%
execute/
host_calls
35.89µs 35.55µs ⚪ -1.04% 46.47µs 45.72µs 🟢 -1.57% 🟢 29%
execute/
memory_fill
1.24ms 1.20ms 🟢 -3.18% 2.00ms 1.83ms 🟢 -9.11% 🟡 52%
execute/
memory_sum
1.18ms 1.18ms ⚪ 0.15% 2.12ms 1.93ms 🟢 -8.71% 🟡 63%
execute/
memory_vec_add
2.37ms 2.38ms ⚪ 0.19% 4.40ms 4.01ms 🟢 -8.58% 🟡 69%
execute/
recursive_is_even
1.05ms 986.59µs 🟢 -5.67% 1.69ms 1.68ms ⚪ -0.20% 🟡 70%
execute/
recursive_ok
121.48µs 120.92µs ⚪ -0.51% 191.26µs 202.87µs 🔴 6.00% 🟡 68%
execute/
recursive_scan
157.58µs 155.89µs ⚪ -1.28% 244.19µs 244.81µs ⚪ 0.18% 🟡 57%
execute/
recursive_trap
12.42µs 12.91µs ⚪ 2.19% 20.52µs 20.33µs ⚪ -0.81% 🟡 58%
execute/
regex_redux
500.20µs 506.22µs ⚪ 1.19% 846.60µs 831.93µs 🟢 -1.71% 🟡 64%
execute/
rev_complement
458.28µs 463.16µs ⚪ 1.03% 783.97µs 735.51µs 🟢 -5.98% 🟡 59%
execute/
tiny_keccak
328.30µs 341.66µs 🔴 3.95% 635.62µs 573.63µs 🟢 -9.82% 🟡 68%
execute/
trunc_f2i
775.03µs 776.20µs ⚪ 0.12% 1.59ms 1.52ms 🟢 -4.26% 🟡 96%
instantiate/
wasm_kernel
55.00µs 52.42µs 🟢 -6.68% 54.71µs 58.36µs 🔴 6.19% 🟢 11%
translate/
erc1155
232.63µs 233.37µs ⚪ 0.10% 433.46µs 432.10µs ⚪ -0.20% 🟡 85%
translate/
erc20
112.56µs 113.45µs ⚪ 0.80% 209.24µs 208.47µs ⚪ -0.18% 🟡 84%
translate/
erc721
161.44µs 159.14µs 🟢 -1.43% 304.41µs 306.07µs ⚪ 0.38% 🟡 92%
translate/
spidermonkey
0.00ns 0.00ns ⚪ -0.27% 0.00ns 0.00ns ⚪ -0.01% 🟢 0%
translate/
wasm_kernel
4.03ms 4.03ms ⚪ 0.02% 7.87ms 7.86ms ⚪ -0.07% 🟡 95%

Link to pipeline

@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2023

Codecov Report

Merging #706 (a7d04aa) into master (cf7736f) will increase coverage by 0.34%.
The diff coverage is 94.02%.

@@            Coverage Diff             @@
##           master     #706      +/-   ##
==========================================
+ Coverage   79.52%   79.87%   +0.34%     
==========================================
  Files         100      101       +1     
  Lines        8414     8436      +22     
==========================================
+ Hits         6691     6738      +47     
+ Misses       1723     1698      -25     
Impacted Files Coverage Δ
crates/wasmi/src/engine/mod.rs 81.02% <ø> (ø)
crates/wasmi/src/engine/config.rs 74.02% <87.50%> (+4.02%) ⬆️
crates/wasmi/src/engine/executor.rs 81.16% <88.46%> (+2.59%) ⬆️
crates/wasmi/tests/e2e/v1/fuel_consumption_mode.rs 100.00% <100.00%> (ø)
crates/wasmi/src/store.rs 79.49% <0.00%> (+2.09%) ⬆️

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

Robbepop and others added 2 commits March 3, 2023 15:55
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
@Robbepop
Copy link
Member Author

Robbepop commented Mar 3, 2023

@athei Gotta fix the performance regressions for the Wasm target before we continue merging this PR ...

@Robbepop
Copy link
Member Author

Robbepop commented Mar 6, 2023

I think the benchmark regressions that we have seen on Wasm targets might be unusual noise. At least with the last commit we see significant improvements even though it is the same set of changes as another previous commit with which we have seen significant regressions ... not sure what to do but I guess it is best to simply go forward and merge this PR ...

@Robbepop Robbepop merged commit 6dbbada into master Mar 6, 2023
@Robbepop Robbepop deleted the rf-fuel-consumption-modes branch March 6, 2023 11:18
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.

Add fuel consumption mode

4 participants