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

Charge fuel for lazy compilation if enabled #876

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented Jan 5, 2024

Closes #873

@paritytech-cicd-pr
Copy link

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
br_table
1.48ms 1.47ms ⚪ -0.69% 1.36ms 1.39ms 🔴 2.86% 🟢 -5%
execute/
call/host/1
51.26µs 50.57µs ⚪ -1.34% 64.76µs 65.12µs ⚪ 0.56% 🟢 29%
execute/
call/rec
172.57µs 170.74µs ⚪ -1.06% 329.60µs 332.26µs ⚪ 0.81% 🟡 95%
execute/
count_until
5.37ms 5.36ms ⚪ -0.23% 7.49ms 7.51ms ⚪ 0.27% 🟢 40%
execute/
divrem
6.32ms 6.33ms ⚪ 0.13% 6.96ms 6.94ms ⚪ -0.29% 🟢 10%
execute/
factorial/iter
269.46µs 238.67µs 🟢 -11.43% 299.96µs 314.07µs 🔴 4.70% 🟢 32%
execute/
factorial/rec
721.87µs 683.50µs 🟢 -5.31% 1.22ms 1.23ms 🔴 1.08% 🟡 80%
execute/
fibonacci/iter
1.33ms 1.31ms 🟢 -1.57% 1.23ms 1.24ms ⚪ 0.79% 🟢 -5%
execute/
fibonacci/rec
6.44ms 6.11ms 🟢 -5.16% 12.35ms 12.56ms 🔴 1.69% 🔴 106%
execute/
fibonacci/tail
1.26ms 1.26ms ⚪ -0.42% 4.61ms 4.35ms 🟢 -5.69% 🔴 246%
execute/
fuse
7.08ms 7.04ms ⚪ -0.52% 11.19ms 11.27ms ⚪ 0.71% 🟡 60%
execute/
global/bump
1.32ms 1.32ms ⚪ -0.21% 1.58ms 1.57ms ⚪ -0.59% 🟢 19%
execute/
global/get_const
481.98µs 478.21µs ⚪ -0.78% 749.31µs 747.27µs ⚪ -0.27% 🟡 56%
execute/
is_even/rec
1.16ms 1.13ms ⚪ -1.86% 2.07ms 2.12ms 🔴 2.07% 🟡 87%
execute/
memory/fill_bytes
1.12ms 1.06ms 🟢 -5.11% 1.23ms 1.26ms 🔴 2.10% 🟢 19%
execute/
memory/sum_bytes
1.09ms 1.06ms 🟢 -2.33% 1.39ms 1.26ms 🟢 -9.57% 🟢 18%
execute/
memory/vec_add
2.94ms 2.95ms ⚪ 0.26% 3.44ms 3.43ms ⚪ -0.42% 🟢 16%
execute/
recursive_scan
194.39µs 197.12µs 🔴 1.41% 352.34µs 355.73µs ⚪ 0.96% 🟡 80%
execute/
recursive_trap
16.06µs 16.06µs ⚪ 0.01% 31.91µs 32.26µs 🔴 1.09% 🔴 101%
execute/
regex_redux
590.14µs 584.87µs ⚪ -0.89% 1.10ms 1.18ms 🔴 7.38% 🔴 102%
execute/
rev_complement
440.02µs 442.81µs ⚪ 0.63% 655.15µs 697.84µs 🔴 6.52% 🟡 58%
execute/
tiny_keccak
352.91µs 351.10µs ⚪ -0.51% 384.60µs 379.52µs 🟢 -1.32% 🟢 8%
execute/
trunc_f2i
613.46µs 589.82µs 🟢 -3.85% 948.33µs 947.70µs ⚪ -0.07% 🟡 61%
instantiate/
wasm_kernel
52.15µs 56.11µs 🔴 7.60% 57.77µs 54.81µs 🟢 -5.11% 🟢 -2%
overhead/
call/typed/0
1.31ms 1.23ms 🟢 -6.51% 890.07µs 873.78µs 🟢 -1.83% 🟢 -29%
overhead/
call/typed/16
1.71ms 1.65ms 🟢 -3.10% 2.55ms 2.56ms ⚪ 0.55% 🟡 55%
overhead/
call/untyped/0
1.64ms 1.59ms 🟢 -3.59% 1.16ms 1.17ms ⚪ 0.95% 🟢 -26%
overhead/
call/untyped/16
2.48ms 2.42ms 🟢 -2.23% 4.51ms 4.43ms 🟢 -1.85% 🟡 83%
translate/
bz2/checked/eager/default
1.32ms 1.33ms ⚪ 0.51% 2.42ms 2.45ms ⚪ 1.33% 🟡 84%
translate/
bz2/checked/eager/fuel
1.42ms 1.43ms ⚪ 0.72% 2.65ms 2.68ms ⚪ 1.01% 🟡 87%
translate/
bz2/checked/lazy-translation/default
542.50µs 541.62µs ⚪ -0.16% 964.69µs 974.66µs ⚪ 1.03% 🟡 80%
translate/
bz2/checked/lazy/default
37.05µs 37.36µs ⚪ 0.85% 46.11µs 46.25µs ⚪ 0.30% 🟢 24%
translate/
bz2/unchecked/eager/default
1.09ms 1.09ms ⚪ 0.20% 1.89ms 1.86ms 🟢 -1.57% 🟡 71%
translate/
erc1155/checked/eager/default
277.27µs 281.30µs 🔴 1.45% 477.64µs 486.87µs 🔴 1.93% 🟡 73%
translate/
erc1155/checked/eager/fuel
296.98µs 300.48µs ⚪ 1.18% 512.14µs 523.58µs 🔴 2.23% 🟡 74%
translate/
erc1155/checked/lazy-translation/default
128.77µs 126.31µs 🟢 -1.92% 211.49µs 212.98µs ⚪ 0.70% 🟡 69%
translate/
erc1155/checked/lazy/default
26.93µs 26.00µs 🟢 -3.45% 32.79µs 33.20µs ⚪ 1.23% 🟢 28%
translate/
erc1155/unchecked/eager/default
231.99µs 230.78µs ⚪ -0.52% 377.40µs 372.04µs ⚪ -1.42% 🟡 61%
translate/
erc20/checked/eager/default
134.16µs 136.45µs 🔴 1.70% 231.20µs 234.36µs ⚪ 1.37% 🟡 72%
translate/
erc20/checked/eager/fuel
141.95µs 143.67µs ⚪ 1.22% 243.75µs 248.06µs 🔴 1.77% 🟡 73%
translate/
erc20/checked/lazy-translation/default
65.91µs 65.35µs ⚪ -0.85% 107.34µs 108.08µs ⚪ 0.70% 🟡 65%
translate/
erc20/checked/lazy/default
19.57µs 19.21µs 🟢 -1.82% 24.93µs 25.27µs 🔴 1.38% 🟢 32%
translate/
erc20/unchecked/eager/default
112.23µs 111.43µs ⚪ -0.72% 180.15µs 177.90µs ⚪ -1.25% 🟡 60%
translate/
erc721/checked/eager/default
191.20µs 191.13µs ⚪ -0.04% 333.67µs 338.34µs ⚪ 1.40% 🟡 77%
translate/
erc721/checked/eager/fuel
201.53µs 202.36µs ⚪ 0.41% 351.68µs 359.87µs 🔴 2.33% 🟡 78%
translate/
erc721/checked/lazy-translation/default
92.24µs 91.05µs 🟢 -1.30% 155.37µs 152.10µs 🟢 -2.10% 🟡 67%
translate/
erc721/checked/lazy/default
24.04µs 23.11µs 🟢 -3.86% 29.01µs 29.40µs 🔴 1.35% 🟢 27%
translate/
erc721/unchecked/eager/default
157.23µs 157.49µs ⚪ 0.17% 257.83µs 252.60µs 🟢 -2.03% 🟡 60%
translate/
pulldown_cmark/checked/eager/default
3.60ms 3.63ms ⚪ 0.88% 6.23ms 6.32ms 🔴 1.49% 🟡 74%
translate/
pulldown_cmark/checked/eager/fuel
3.87ms 3.91ms ⚪ 1.02% 6.73ms 6.84ms 🔴 1.56% 🟡 75%
translate/
pulldown_cmark/checked/lazy-translation/default
1.53ms 1.54ms ⚪ 0.82% 2.56ms 2.58ms ⚪ 0.51% 🟡 67%
translate/
pulldown_cmark/checked/lazy/default
253.74µs 254.80µs ⚪ 0.42% 247.00µs 251.11µs ⚪ 1.66% 🟢 -1%
translate/
pulldown_cmark/unchecked/eager/default
3.02ms 3.05ms ⚪ 1.16% 4.90ms 4.86ms ⚪ -0.73% 🟡 59%
translate/
spidermonkey/checked/eager/default
76.35ms 76.72ms ⚪ 0.48% 135.58ms 137.03ms ⚪ 1.07% 🟡 79%
translate/
spidermonkey/checked/eager/fuel
82.41ms 82.73ms ⚪ 0.39% 146.49ms 147.94ms ⚪ 0.99% 🟡 79%
translate/
spidermonkey/checked/lazy-translation/default
32.42ms 32.56ms ⚪ 0.43% 56.03ms 56.23ms ⚪ 0.35% 🟡 73%
translate/
spidermonkey/checked/lazy/default
3.22ms 3.36ms 🔴 4.07% 4.02ms 3.92ms 🟢 -2.46% 🟢 17%
translate/
spidermonkey/unchecked/eager/default
63.94ms 64.04ms ⚪ 0.15% 107.95ms 104.14ms 🟢 -3.53% 🟡 63%
translate/
wasm_kernel/checked/eager/default
5.05ms 5.08ms ⚪ 0.55% 8.82ms 8.92ms ⚪ 1.14% 🟡 76%
translate/
wasm_kernel/checked/eager/fuel
5.21ms 5.23ms ⚪ 0.33% 9.33ms 9.39ms ⚪ 0.67% 🟡 79%
translate/
wasm_kernel/checked/lazy-translation/default
2.42ms 2.40ms ⚪ -0.63% 3.98ms 3.98ms ⚪ 0.06% 🟡 66%
translate/
wasm_kernel/checked/lazy/default
429.76µs 427.07µs ⚪ -0.63% 479.73µs 491.57µs 🔴 2.47% 🟢 15%
translate/
wasm_kernel/unchecked/eager/default
4.14ms 4.14ms ⚪ 0.14% 6.79ms 6.70ms 🟢 -1.24% 🟡 62%

Link to pipeline

@Robbepop Robbepop merged commit d80c19f into master Jan 5, 2024
20 checks passed
@Robbepop Robbepop deleted the rf-lazy-compilation-fuel branch January 5, 2024 13:03
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 metering for lazily compiled functions
2 participants