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 engine internals #865

Closed
wants to merge 23 commits into from
Closed

Refactor engine internals #865

wants to merge 23 commits into from

Conversation

Robbepop
Copy link
Member

No description provided.

This is a bit more convenient than the get_mut method which now is private.
@paritytech-cicd-pr
Copy link

paritytech-cicd-pr commented Dec 24, 2023

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
br_table
1.47ms 1.48ms ⚪ 0.94% 1.38ms 1.42ms 🔴 2.89% 🟢 -4%
execute/
call/host/1
49.88µs 49.50µs ⚪ -0.76% 65.68µs 65.67µs ⚪ -0.01% 🟢 33%
execute/
call/rec
173.92µs 169.79µs 🟢 -2.37% 334.87µs 357.32µs 🔴 6.71% 🔴 110%
execute/
count_until
5.33ms 5.44ms 🔴 2.05% 7.57ms 7.93ms 🔴 4.73% 🟢 46%
execute/
divrem
6.23ms 6.34ms 🔴 1.73% 7.15ms 7.01ms 🟢 -1.88% 🟢 11%
execute/
factorial/iter
267.02µs 289.29µs 🔴 8.34% 342.51µs 315.05µs 🟢 -8.02% 🟢 9%
execute/
factorial/rec
714.63µs 692.05µs 🟢 -3.16% 1.24ms 1.31ms 🔴 5.23% 🟡 89%
execute/
fibonacci/iter
1.33ms 1.33ms ⚪ -0.41% 1.25ms 1.55ms 🔴 23.78% 🟢 17%
execute/
fibonacci/rec
6.17ms 6.01ms 🟢 -2.59% 12.43ms 13.90ms 🔴 11.77% 🔴 131%
execute/
fibonacci/tail
1.27ms 1.29ms 🔴 1.29% 4.49ms 4.37ms 🟢 -2.63% 🔴 239%
execute/
fuse
7.07ms 7.11ms ⚪ 0.55% 11.32ms 11.33ms ⚪ 0.08% 🟡 59%
execute/
global/bump
1.32ms 1.31ms ⚪ -0.31% 1.61ms 1.75ms 🔴 8.54% 🟢 33%
execute/
global/get_const
500.46µs 481.48µs 🟢 -3.79% 759.64µs 786.00µs 🔴 3.47% 🟡 63%
execute/
is_even/rec
1.13ms 1.10ms 🟢 -3.19% 2.13ms 2.19ms 🔴 2.70% 🟡 100%
execute/
memory/fill_bytes
1.12ms 934.58µs 🟢 -16.25% 1.25ms 1.37ms 🔴 9.10% 🟢 46%
execute/
memory/sum_bytes
1.09ms 977.80µs 🟢 -10.54% 1.42ms 1.32ms 🟢 -6.86% 🟢 35%
execute/
memory/vec_add
2.95ms 2.97ms ⚪ 0.60% 3.52ms 4.06ms 🔴 15.36% 🟢 37%
execute/
recursive_scan
197.21µs 190.69µs 🟢 -3.31% 357.61µs 366.82µs 🔴 2.58% 🟡 92%
execute/
recursive_trap
16.30µs 15.73µs 🟢 -3.49% 32.37µs 34.35µs 🔴 6.12% 🔴 118%
execute/
regex_redux
589.49µs 585.16µs ⚪ -0.73% 1.13ms 1.21ms 🔴 7.49% 🔴 108%
execute/
rev_complement
439.47µs 457.44µs 🔴 4.09% 673.07µs 738.10µs 🔴 9.66% 🟡 61%
execute/
tiny_keccak
352.48µs 352.57µs ⚪ 0.03% 386.93µs 407.96µs 🔴 5.44% 🟢 16%
execute/
trunc_f2i
612.76µs 637.26µs 🔴 4.00% 962.77µs 961.54µs ⚪ -0.13% 🟡 51%
instantiate/
wasm_kernel
54.56µs 55.98µs 🔴 2.61% 59.13µs 58.49µs ⚪ -1.07% 🟢 4%
overhead/
call/typed/0
1.26ms 1.39ms 🔴 9.88% 891.56µs 881.49µs ⚪ -1.13% 🟢 -36%
overhead/
call/typed/16
1.67ms 1.66ms ⚪ -0.08% 2.55ms 2.45ms 🟢 -3.91% 🟢 47%
overhead/
call/untyped/0
1.58ms 1.70ms 🔴 7.30% 1.17ms 1.24ms 🔴 6.48% 🟢 -27%
overhead/
call/untyped/16
2.45ms 2.47ms ⚪ 1.08% 4.38ms 4.21ms 🟢 -3.76% 🟡 70%
translate/
bz2/checked/eager/default
1.32ms 1.31ms ⚪ -0.76% 2.49ms 2.47ms ⚪ -0.88% 🟡 88%
translate/
bz2/checked/eager/fuel
1.43ms 1.42ms ⚪ -0.84% 2.69ms 2.71ms ⚪ 0.60% 🟡 90%
translate/
bz2/checked/lazy-translation/default
542.19µs 536.33µs ⚪ -1.08% 999.34µs 981.61µs 🟢 -1.77% 🟡 83%
translate/
bz2/checked/lazy/default
37.95µs 36.90µs 🟢 -2.75% 47.34µs 47.28µs ⚪ -0.12% 🟢 28%
translate/
bz2/unchecked/eager/default
1.08ms 1.08ms ⚪ -0.05% 1.90ms 1.89ms ⚪ -0.64% 🟡 74%
translate/
erc1155/checked/eager/default
279.59µs 277.27µs ⚪ -0.83% 485.84µs 489.11µs ⚪ 0.67% 🟡 76%
translate/
erc1155/checked/eager/fuel
301.69µs 299.27µs ⚪ -0.80% 515.21µs 517.77µs ⚪ 0.50% 🟡 73%
translate/
erc1155/checked/lazy-translation/default
126.67µs 126.32µs ⚪ -0.28% 216.59µs 214.97µs ⚪ -0.75% 🟡 70%
translate/
erc1155/checked/lazy/default
25.91µs 26.13µs ⚪ 0.84% 33.37µs 33.46µs ⚪ 0.28% 🟢 28%
translate/
erc1155/unchecked/eager/default
231.22µs 232.55µs ⚪ 0.58% 380.15µs 374.37µs ⚪ -1.52% 🟡 61%
translate/
erc20/checked/eager/default
136.73µs 135.44µs ⚪ -0.94% 232.08µs 233.85µs ⚪ 0.76% 🟡 73%
translate/
erc20/checked/eager/fuel
144.61µs 143.65µs ⚪ -0.67% 247.10µs 248.08µs ⚪ 0.40% 🟡 73%
translate/
erc20/checked/lazy-translation/default
65.23µs 65.28µs ⚪ 0.08% 109.07µs 110.58µs ⚪ 1.39% 🟡 69%
translate/
erc20/checked/lazy/default
19.56µs 19.33µs ⚪ -1.20% 25.40µs 25.79µs ⚪ 1.54% 🟢 33%
translate/
erc20/unchecked/eager/default
112.42µs 112.58µs ⚪ 0.14% 183.43µs 180.39µs 🟢 -1.66% 🟡 60%
translate/
erc721/checked/eager/default
194.24µs 191.54µs 🟢 -1.39% 337.03µs 338.63µs ⚪ 0.47% 🟡 77%
translate/
erc721/checked/eager/fuel
203.67µs 202.45µs ⚪ -0.60% 357.28µs 356.02µs ⚪ -0.35% 🟡 76%
translate/
erc721/checked/lazy-translation/default
91.35µs 90.73µs ⚪ -0.69% 157.64µs 154.67µs 🟢 -1.88% 🟡 70%
translate/
erc721/checked/lazy/default
23.04µs 23.39µs ⚪ 1.50% 29.36µs 29.46µs ⚪ 0.35% 🟢 26%
translate/
erc721/unchecked/eager/default
157.26µs 157.85µs ⚪ 0.38% 261.89µs 254.56µs 🟢 -2.80% 🟡 61%
translate/
pulldown_cmark/checked/eager/default
3.70ms 3.66ms ⚪ -1.09% 6.53ms 6.58ms ⚪ 0.87% 🟡 80%
translate/
pulldown_cmark/checked/eager/fuel
4.00ms 3.98ms ⚪ -0.46% 7.05ms 7.12ms ⚪ 0.96% 🟡 79%
translate/
pulldown_cmark/checked/lazy-translation/default
1.55ms 1.54ms ⚪ -0.04% 2.77ms 2.74ms ⚪ -0.94% 🟡 78%
translate/
pulldown_cmark/checked/lazy/default
264.15µs 264.88µs ⚪ 0.28% 258.08µs 264.89µs 🔴 2.64% 🟢 0%
translate/
pulldown_cmark/unchecked/eager/default
3.09ms 3.10ms ⚪ 0.58% 5.19ms 5.17ms ⚪ -0.39% 🟡 67%
translate/
spidermonkey/checked/eager/default
77.09ms 76.52ms ⚪ -0.73% 138.35ms 138.90ms ⚪ 0.40% 🟡 82%
translate/
spidermonkey/checked/eager/fuel
83.53ms 83.08ms ⚪ -0.54% 149.51ms 149.77ms ⚪ 0.17% 🟡 80%
translate/
spidermonkey/checked/lazy-translation/default
32.77ms 32.69ms ⚪ -0.25% 58.58ms 57.70ms ⚪ -1.51% 🟡 76%
translate/
spidermonkey/checked/lazy/default
4.03ms 3.75ms 🟢 -7.03% 5.11ms 5.14ms ⚪ 0.61% 🟢 37%
translate/
spidermonkey/unchecked/eager/default
64.56ms 64.36ms ⚪ -0.32% 107.34ms 108.03ms ⚪ 0.65% 🟡 68%
translate/
wasm_kernel/checked/eager/default
5.16ms 5.12ms ⚪ -0.84% 9.12ms 9.12ms ⚪ 0.09% 🟡 78%
translate/
wasm_kernel/checked/eager/fuel
5.35ms 5.28ms ⚪ -1.27% 9.55ms 9.63ms ⚪ 0.88% 🟡 82%
translate/
wasm_kernel/checked/lazy-translation/default
2.44ms 2.41ms ⚪ -0.96% 4.16ms 4.19ms ⚪ 0.67% 🟡 74%
translate/
wasm_kernel/checked/lazy/default
431.33µs 423.07µs 🟢 -1.91% 499.89µs 504.73µs ⚪ 0.97% 🟢 19%
translate/
wasm_kernel/unchecked/eager/default
4.19ms 4.18ms ⚪ -0.15% 7.08ms 7.00ms ⚪ -1.02% 🟡 67%

Link to pipeline

@codecov-commenter
Copy link

codecov-commenter commented Dec 24, 2023

Codecov Report

Attention: 51 lines in your changes are missing coverage. Please review.

Comparison is base (688d986) 80.81% compared to head (1381b11) 80.64%.

Files Patch % Lines
crates/wasmi/src/engine/executor/stack/exec.rs 0.00% 42 Missing ⚠️
crates/wasmi/src/engine/executor/stack/values.rs 53.84% 6 Missing ⚠️
crates/wasmi/src/engine/executor/stack/calls.rs 0.00% 2 Missing ⚠️
crates/wasmi/src/engine/executor/instrs/call.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #865      +/-   ##
==========================================
- Coverage   80.81%   80.64%   -0.18%     
==========================================
  Files         256      257       +1     
  Lines       22908    22960      +52     
==========================================
+ Hits        18513    18515       +2     
- Misses       4395     4445      +50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Robbepop
Copy link
Member Author

This got stale and the good parts have already been merged. Closed for now.

@Robbepop Robbepop closed this Feb 26, 2024
@Robbepop Robbepop deleted the rf-refactor-engine-stack branch March 11, 2024 09:46
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