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

Store Wasm function entities in StoreInner #686

Merged
merged 13 commits into from
Feb 20, 2023

Conversation

Robbepop
Copy link
Member

No description provided.

@paritytech-cicd-pr
Copy link

paritytech-cicd-pr commented Feb 20, 2023

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.45ms 1.46ms 🔴 0.11% 1.13ms 1.08ms 🟢 -4.42% 🟢 -26%
execute/
bare_call_0/typed
1.05ms 1.33ms 🔴 25.98% 729.51µs 732.14µs ⚪ 0.39% 🟢 -45%
execute/
bare_call_1
1.49ms 1.50ms 🔴 0.65% 1.31ms 1.22ms 🟢 -6.48% 🟢 -19%
execute/
bare_call_16
2.36ms 2.30ms 🟢 -2.54% 4.04ms 3.53ms 🟢 -12.41% 🟡 53%
execute/
bare_call_16/typed
1.65ms 1.58ms 🟢 -4.28% 2.35ms 1.61ms 🟢 -31.39% 🟢 2%
execute/
bare_call_1/typed
1.16ms 1.34ms 🔴 16.03% 1.14ms 955.31µs 🟢 -16.36% 🟢 -29%
execute/
bare_call_4
1.66ms 1.66ms 🔴 0.27% 1.77ms 1.62ms 🟢 -8.16% 🟢 -3%
execute/
bare_call_4/typed
1.16ms 1.41ms 🔴 21.79% 1.37ms 1.04ms 🟢 -23.39% 🟢 -26%
execute/
br_table
1.19ms 1.18ms ⚪ -0.02% 1.36ms 1.17ms 🟢 -13.74% 🟢 -1%
execute/
count_until
652.93µs 698.75µs 🔴 7.19% 2.43ms 1.51ms 🟢 -37.76% 🔴 116%
execute/
factorial_iterative
317.97µs 315.61µs ⚪ -0.52% 936.47µs 733.45µs 🟢 -21.77% 🔴 132%
execute/
factorial_recursive
653.84µs 641.26µs 🟢 -1.88% 1.36ms 1.25ms 🟢 -8.44% 🟡 94%
execute/
fib_iterative
1.41ms 1.41ms ⚪ 0.07% 5.29ms 3.49ms 🟢 -34.08% 🔴 148%
execute/
fib_recursive
6.06ms 5.86ms 🟢 -3.28% 11.88ms 10.91ms 🟢 -8.28% 🟡 86%
execute/
global_bump
1.03ms 1.04ms ⚪ 1.06% 2.72ms 2.53ms 🟢 -6.76% 🔴 144%
execute/
global_const
687.29µs 686.19µs ⚪ -0.04% 2.46ms 1.94ms 🟢 -20.92% 🔴 183%
execute/
host_calls
27.80µs 28.40µs 🔴 2.33% 39.13µs 39.71µs 🔴 1.46% 🟢 40%
execute/
memory_fill
1.19ms 1.20ms ⚪ 0.50% 4.31ms 2.93ms 🟢 -31.98% 🔴 144%
execute/
memory_sum
1.17ms 1.17ms ⚪ -0.02% 4.30ms 2.82ms 🟢 -34.50% 🔴 140%
execute/
memory_vec_add
2.39ms 2.39ms ⚪ -0.13% 7.91ms 6.57ms 🟢 -17.02% 🔴 175%
execute/
recursive_is_even
1.16ms 1.14ms 🟢 -2.15% 2.23ms 2.06ms 🟢 -7.63% 🟡 81%
execute/
recursive_ok
158.60µs 152.90µs 🟢 -3.84% 323.30µs 286.00µs 🟢 -11.54% 🟡 87%
execute/
recursive_scan
194.17µs 177.58µs 🟢 -8.91% 393.41µs 358.93µs 🟢 -8.63% 🔴 102%
execute/
recursive_trap
15.00µs 14.81µs 🟢 -1.93% 32.31µs 28.15µs 🟢 -12.82% 🟡 90%
execute/
regex_redux
554.59µs 529.20µs 🟢 -4.59% 1.40ms 1.22ms 🟢 -12.93% 🔴 130%
execute/
rev_complement
463.74µs 459.88µs ⚪ -0.81% 1.42ms 1.07ms 🟢 -24.64% 🔴 132%
execute/
tiny_keccak
324.74µs 325.56µs ⚪ 0.33% 1.15ms 892.48µs 🟢 -22.63% 🔴 174%
execute/
trunc_f2i
690.87µs 691.66µs ⚪ 0.06% 2.18ms 1.86ms 🟢 -14.42% 🔴 169%
instantiate/
wasm_kernel
61.32µs 55.05µs 🟢 -12.15% 72.04µs 54.25µs 🟢 -22.87% 🟢 -1%
translate/
erc1155
235.06µs 233.00µs ⚪ -0.89% 440.69µs 445.63µs ⚪ 0.88% 🟡 91%
translate/
erc20
113.73µs 113.36µs ⚪ -0.61% 212.57µs 214.50µs ⚪ 0.94% 🟡 89%
translate/
erc721
161.08µs 160.96µs ⚪ -0.28% 310.15µs 312.58µs ⚪ 0.74% 🟡 94%
translate/
spidermonkey
0.00ns 0.00ns ⚪ -0.65% 0.00ns 0.00ns ⚪ 0.21% 🟢 0%
translate/
wasm_kernel
4.05ms 4.05ms ⚪ -0.16% 8.07ms 8.07ms ⚪ 0.02% 🟡 99%

Link to pipeline

Now Store<T> only stores the host function trampolines because they are the only types that need to be generic over the host state.
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2023

Codecov Report

Merging #686 (99a05a0) into master (2f4d714) will decrease coverage by 0.03%.
The diff coverage is 76.54%.

@@            Coverage Diff             @@
##           master     #686      +/-   ##
==========================================
- Coverage   81.08%   81.05%   -0.03%     
==========================================
  Files         100      100              
  Lines        8474     8500      +26     
==========================================
+ Hits         6871     6890      +19     
- Misses       1603     1610       +7     
Impacted Files Coverage Δ
crates/wasmi/src/func/typed_func.rs 63.15% <0.00%> (-5.27%) ⬇️
crates/wasmi/src/module/instantiate/mod.rs 75.64% <66.66%> (-0.34%) ⬇️
crates/wasmi/src/engine/mod.rs 82.50% <73.33%> (-0.84%) ⬇️
crates/wasmi/src/func/mod.rs 80.99% <76.19%> (+0.28%) ⬆️
crates/wasmi/src/store.rs 76.19% <89.47%> (+0.88%) ⬆️

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

@Robbepop Robbepop merged commit 43f525c into master Feb 20, 2023
@Robbepop Robbepop deleted the rf-store-funcs-in-store-inner branch February 20, 2023 23:08
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