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

Allow local.set optimization with active preservation #792

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

Robbepop
Copy link
Member

Closes #765

@Robbepop Robbepop changed the title allow local.set optimization with active preservation Allow local.set optimization with active preservation Nov 21, 2023
@paritytech-cicd-pr
Copy link

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.57ms 1.63ms 🔴 3.49% 1.19ms 1.12ms 🔴 -5.44% 🟢 -31%
execute/
bare_call_0/typed
1.16ms 1.18ms ⚪ 1.43% 799.96µs 872.29µs 🔴 9.13% 🟢 -26%
execute/
bare_call_1
1.61ms 1.70ms 🔴 6.36% 1.27ms 1.26ms 🔴 -3.10% 🟢 -26%
execute/
bare_call_16
2.46ms 2.53ms 🔴 2.78% 3.40ms 3.55ms 🔴 4.37% 🟢 41%
execute/
bare_call_16/typed
1.57ms 1.73ms 🔴 10.14% 1.89ms 1.94ms 🔴 2.68% 🟢 13%
execute/
bare_call_1/typed
1.26ms 1.28ms 🔴 1.68% 986.37µs 991.58µs ⚪ 0.57% 🟢 -22%
execute/
bare_call_4
1.84ms 1.83ms 🔴 -0.43% 1.71ms 1.65ms 🔴 -3.04% 🟢 -10%
execute/
bare_call_4/typed
1.21ms 1.31ms 🔴 8.18% 1.04ms 1.10ms 🔴 5.23% 🟢 -16%
execute/
br_table
1.36ms 1.39ms 🔴 1.81% 1.15ms 1.15ms ⚪ 0.06% 🟢 -17%
execute/
count_until
546.68µs 546.45µs ⚪ -0.08% 1.75ms 1.70ms 🟢 -3.11% 🔴 211%
execute/
factorial_iterative
365.34µs 323.28µs 🟢 -11.50% 802.76µs 807.45µs ⚪ 0.69% 🔴 150%
execute/
factorial_recursive
497.30µs 492.44µs ⚪ -1.01% 970.26µs 967.54µs ⚪ -0.33% 🟡 96%
execute/
fibonacci_iter
1.40ms 1.40ms ⚪ -0.20% 3.85ms 3.81ms ⚪ -0.95% 🔴 173%
execute/
fibonacci_rec
3.97ms 3.96ms ⚪ -0.20% 8.50ms 8.60ms 🔴 1.16% 🔴 117%
execute/
fibonacci_tail
859.42µs 939.40µs 🔴 9.35% 2.18ms 2.20ms ⚪ 0.93% 🔴 134%
execute/
global_bump
740.93µs 747.95µs ⚪ 0.99% 2.20ms 2.18ms ⚪ -0.77% 🔴 192%
execute/
global_const
660.98µs 659.30µs ⚪ -0.22% 2.39ms 2.45ms 🔴 1.78% 🔴 271%
execute/
host_calls
36.81µs 36.90µs ⚪ 0.72% 39.35µs 39.84µs ⚪ 1.12% 🟢 8%
execute/
memory_fill
1.21ms 1.15ms 🟢 -5.37% 3.29ms 3.32ms ⚪ 0.83% 🔴 189%
execute/
memory_sum
1.18ms 1.14ms 🟢 -3.98% 3.29ms 3.29ms ⚪ 0.10% 🔴 189%
execute/
memory_vec_add
2.34ms 2.35ms ⚪ 0.08% 7.35ms 7.39ms ⚪ 0.37% 🔴 215%
execute/
recursive_is_even
660.86µs 665.30µs ⚪ 1.11% 1.47ms 1.45ms 🟢 -1.62% 🔴 117%
execute/
recursive_ok
94.58µs 94.46µs ⚪ -0.19% 200.19µs 200.00µs ⚪ -0.21% 🔴 112%
execute/
recursive_scan
129.77µs 129.22µs ⚪ -0.40% 287.08µs 284.63µs ⚪ -0.72% 🔴 120%
execute/
recursive_trap
8.91µs 9.42µs ⚪ 4.74% 20.96µs 20.86µs ⚪ -0.40% 🔴 121%
execute/
regex_redux
456.02µs 507.09µs 🔴 11.14% 1.23ms 1.24ms ⚪ 0.92% 🔴 144%
execute/
rev_complement
430.99µs 422.41µs 🟢 -2.04% 1.15ms 1.15ms ⚪ -0.49% 🔴 171%
execute/
tiny_keccak
329.11µs 332.54µs ⚪ 0.31% 1.10ms 1.12ms 🔴 2.36% 🔴 238%
execute/
trunc_f2i
732.13µs 737.25µs ⚪ 0.72% 1.71ms 1.71ms ⚪ 0.18% 🔴 132%
instantiate/
wasm_kernel
52.58µs 55.78µs ⚪ 3.15% 58.23µs 55.31µs 🟢 -3.73% 🟢 -1%
translate/
erc1155
207.67µs 208.61µs ⚪ 0.93% 374.00µs 372.52µs ⚪ -0.24% 🟡 79%
translate/
erc20
103.60µs 105.15µs 🔴 1.55% 179.85µs 180.79µs ⚪ 0.38% 🟡 72%
translate/
erc721
147.25µs 146.77µs ⚪ -0.35% 261.04µs 260.51µs ⚪ 0.49% 🟡 77%
translate/
spidermonkey
64.42ms 64.45ms ⚪ 0.06% 0.00ns 0.00ns ⚪ -0.73% 🟢 -100%
translate/
wasm_kernel
4.26ms 4.22ms ⚪ -0.80% 6.75ms 6.73ms ⚪ -0.02% 🟡 60%

Link to pipeline

@Robbepop Robbepop merged commit ea3a29c into master Nov 21, 2023
13 checks passed
@Robbepop Robbepop deleted the rf-improve-local-set-opt branch November 21, 2023 20:50
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.

Improve local.set result replacement optimization when preserving local.get at the same time
2 participants