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

Clean up and improve host function trampoline API #664

Merged
merged 3 commits into from
Feb 10, 2023

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented Feb 10, 2023

The new API guarantees at compile time that host functions use this API correctly from start to finish.

@paritytech-cicd-pr
Copy link

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.49ms 1.46ms 🟢 -1.99% 1.17ms 1.17ms 🟢 0.28% 🟢 -20%
execute/
bare_call_0/typed
1.07ms 1.06ms ⚪ -0.44% 775.54µs 767.63µs 🟢 -1.14% 🟢 -28%
execute/
bare_call_1
1.54ms 1.50ms 🟢 -2.03% 1.38ms 1.36ms 🟢 -1.05% 🟢 -9%
execute/
bare_call_16
2.36ms 2.34ms 🟢 -0.58% 4.28ms 4.27ms ⚪ 0.00% 🟡 83%
execute/
bare_call_16/typed
1.66ms 1.59ms 🟢 -3.48% 2.23ms 2.23ms ⚪ -0.07% 🟢 40%
execute/
bare_call_1/typed
1.22ms 1.17ms 🟢 -3.23% 1.22ms 1.19ms 🟢 -1.96% 🟢 1%
execute/
bare_call_4
1.76ms 1.67ms 🟢 -5.20% 1.85ms 1.86ms 🟢 0.61% 🟢 12%
execute/
bare_call_4/typed
1.21ms 1.17ms 🟢 -2.66% 1.24ms 1.22ms 🟢 -1.48% 🟢 4%
execute/
br_table
1.29ms 1.19ms 🟢 -8.03% 1.41ms 1.43ms 🔴 1.40% 🟢 20%
execute/
count_until
651.61µs 651.49µs ⚪ -0.07% 2.13ms 2.13ms ⚪ -0.01% 🔴 227%
execute/
factorial_iterative
342.15µs 332.24µs 🟢 -3.11% 908.63µs 913.40µs ⚪ 0.62% 🔴 175%
execute/
factorial_recursive
643.10µs 661.86µs 🔴 2.98% 1.57ms 1.35ms 🟢 -14.22% 🔴 104%
execute/
fib_iterative
1.52ms 1.51ms ⚪ -0.65% 5.00ms 5.01ms ⚪ 0.04% 🔴 232%
execute/
fib_recursive
5.92ms 6.10ms 🔴 3.03% 13.12ms 12.03ms 🟢 -8.45% 🟡 97%
execute/
global_bump
964.03µs 963.59µs ⚪ 0.07% 3.00ms 2.56ms 🟢 -14.45% 🔴 166%
execute/
global_const
742.69µs 742.30µs ⚪ -0.05% 2.40ms 2.40ms ⚪ 0.23% 🔴 224%
execute/
host_calls
27.74µs 27.72µs ⚪ -0.54% 40.11µs 43.02µs 🔴 7.28% 🟡 55%
execute/
memory_fill
1.31ms 1.31ms ⚪ -0.39% 4.03ms 4.03ms ⚪ -0.03% 🔴 208%
execute/
memory_sum
1.30ms 1.30ms ⚪ 0.03% 4.01ms 4.01ms ⚪ 0.07% 🔴 208%
execute/
memory_vec_add
2.51ms 2.51ms ⚪ 0.06% 7.64ms 7.65ms ⚪ 0.20% 🔴 205%
execute/
recursive_is_even
1.14ms 1.13ms ⚪ -0.61% 2.29ms 2.27ms ⚪ -0.98% 🔴 101%
execute/
recursive_ok
150.77µs 154.78µs 🔴 2.67% 311.78µs 309.14µs ⚪ -0.89% 🟡 100%
execute/
recursive_scan
178.85µs 179.51µs ⚪ 0.45% 400.86µs 395.04µs ⚪ -1.56% 🔴 120%
execute/
recursive_trap
14.94µs 14.86µs ⚪ -0.57% 32.49µs 30.86µs 🟢 -5.03% 🔴 108%
execute/
regex_redux
553.41µs 536.47µs 🟢 -3.17% 1.40ms 1.37ms 🟢 -1.53% 🔴 156%
execute/
rev_complement
501.03µs 490.78µs 🟢 -2.07% 1.40ms 1.39ms ⚪ -0.09% 🔴 184%
execute/
tiny_keccak
352.11µs 353.13µs ⚪ 0.17% 1.14ms 1.14ms ⚪ -0.02% 🔴 224%
execute/
trunc_f2i
724.46µs 725.57µs ⚪ 0.18% 2.15ms 2.15ms ⚪ 0.05% 🔴 196%
instantiate/
wasm_kernel
66.71µs 67.37µs 🔴 2.55% 69.24µs 70.74µs ⚪ 1.68% 🟢 5%
translate/
erc1155
210.06µs 207.93µs ⚪ -0.83% 425.54µs 387.56µs 🟢 -9.00% 🟡 86%
translate/
erc20
103.53µs 103.05µs ⚪ -0.67% 206.99µs 190.93µs 🟢 -7.71% 🟡 85%
translate/
erc721
146.38µs 145.97µs ⚪ -0.13% 302.58µs 277.25µs 🟢 -8.45% 🟡 90%
translate/
spidermonkey
72.00ms 71.36ms ⚪ -0.86% 0.00ns 0.00ns 🟢 -8.35% 🟢 -100%
translate/
wasm_kernel
3.77ms 3.74ms ⚪ -0.85% 7.86ms 7.16ms 🟢 -8.96% 🟡 91%

Link to pipeline

@Robbepop Robbepop merged commit 852f14a into master Feb 10, 2023
@Robbepop Robbepop deleted the rf-cleanup-func-args branch February 10, 2023 11:53
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.

None yet

2 participants