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

Import wasi_cap_std_sync::Dir instead of wasi_cap_std_sync::dir::Dir. #571

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

Berrysoft
Copy link
Contributor

The former is re-exported from cap-std, which is the type used in preopen_dir, while the latter is the internal type of wasi_cap_std_sync. This change follows the behavior of wasmtime-wasi, and will reduce users' works on managing imports.

https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi/src/lib.rs#L15-L24

This type is used in preopen_dir.
@paritytech-cicd-pr
Copy link

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.01ms 1.02ms ⚪ 1.20% 936.88µs 902.05µs 🟢 -3.65% 🟢 -12%
execute/
bare_call_0/typed
520.10µs 516.38µs ⚪ -0.94% 403.62µs 399.15µs ⚪ -0.99% 🟢 -23%
execute/
bare_call_1
1.05ms 1.06ms 🟢 0.56% 1.11ms 1.11ms 🟢 -0.41% 🟢 5%
execute/
bare_call_16
2.13ms 2.18ms 🟢 -0.80% 4.68ms 4.70ms 🟢 0.31% 🔴 116%
execute/
bare_call_16/typed
1.58ms 1.54ms 🟢 -2.42% 2.15ms 1.98ms 🟢 -8.23% 🟢 28%
execute/
bare_call_1/typed
603.22µs 608.90µs ⚪ 0.86% 713.28µs 688.56µs 🟢 -3.34% 🟢 13%
execute/
bare_call_4
1.19ms 1.19ms 🟢 0.05% 1.73ms 1.74ms 🟢 0.38% 🟢 46%
execute/
bare_call_4/typed
628.09µs 611.69µs 🟢 -2.69% 818.17µs 802.63µs 🟢 -1.88% 🟢 31%
execute/
br_table
633.96µs 641.18µs ⚪ -6.00% 910.42µs 880.44µs 🟢 -3.39% 🟢 37%
execute/
count_until
653.66µs 650.95µs ⚪ -0.86% 2.01ms 2.02ms ⚪ 0.24% 🔴 211%
execute/
factorial_iterative
303.45µs 365.29µs 🔴 20.60% 852.97µs 838.93µs ⚪ -1.06% 🔴 130%
execute/
factorial_recursive
605.01µs 610.84µs ⚪ 0.95% 1.26ms 1.34ms 🔴 6.87% 🔴 120%
execute/
fib_iterative
1.63ms 1.43ms 🟢 -12.43% 4.51ms 4.50ms ⚪ -0.15% 🔴 214%
execute/
fib_recursive
5.94ms 5.89ms ⚪ -0.96% 11.75ms 11.91ms 🔴 1.35% 🔴 102%
execute/
global_bump
948.63µs 948.29µs ⚪ -0.14% 3.13ms 3.14ms ⚪ 0.83% 🔴 231%
execute/
global_const
717.71µs 717.38µs ⚪ -0.17% 2.33ms 2.33ms ⚪ -0.22% 🔴 224%
execute/
host_calls
28.60µs 30.95µs 🔴 8.19% 37.54µs 37.64µs ⚪ 0.40% 🟢 22%
execute/
memory_fill
1.28ms 1.37ms 🔴 6.84% 3.91ms 3.90ms ⚪ -0.44% 🔴 185%
execute/
memory_sum
1.25ms 1.25ms ⚪ 0.04% 3.94ms 3.93ms ⚪ -0.03% 🔴 213%
execute/
memory_vec_add
2.82ms 2.59ms 🟢 -7.93% 8.26ms 8.31ms ⚪ 0.62% 🔴 221%
execute/
recursive_is_even
1.12ms 1.12ms ⚪ -0.26% 2.12ms 2.10ms ⚪ -1.11% 🟡 88%
execute/
recursive_ok
145.96µs 146.57µs ⚪ 0.63% 309.67µs 294.69µs 🟢 -4.84% 🔴 101%
execute/
recursive_scan
179.02µs 179.30µs ⚪ 0.26% 382.07µs 370.87µs 🟢 -2.80% 🔴 107%
execute/
recursive_trap
14.44µs 14.47µs ⚪ 0.31% 28.65µs 28.53µs ⚪ -0.67% 🟡 97%
execute/
regex_redux
543.07µs 545.28µs ⚪ 0.33% 1.40ms 1.40ms ⚪ 0.07% 🔴 156%
execute/
rev_complement
503.21µs 502.00µs ⚪ -0.18% 1.40ms 1.45ms 🔴 3.58% 🔴 189%
execute/
tiny_keccak
374.95µs 371.43µs ⚪ -1.16% 1.17ms 1.17ms ⚪ 0.00% 🔴 215%
execute/
trunc_f2i
917.85µs 909.56µs ⚪ -0.82% 2.38ms 2.38ms ⚪ 0.24% 🔴 162%
instantiate/
wasm_kernel
57.84µs 60.57µs 🔴 3.11% 94.96µs 65.96µs 🟢 -30.50% 🟢 9%
translate/
erc1155
205.63µs 208.65µs 🔴 1.52% 378.69µs 379.39µs ⚪ 0.24% 🟡 82%
translate/
erc20
101.31µs 102.63µs 🔴 1.32% 182.26µs 186.97µs 🔴 2.70% 🟡 82%
translate/
erc721
145.21µs 146.36µs ⚪ 0.84% 267.83µs 271.31µs 🔴 1.47% 🟡 85%
translate/
spidermonkey
0.00ns 0.00ns ⚪ -0.35% 0.00ns 0.00ns ⚪ 0.51% 🟢 0%
translate/
wasm_kernel
3.74ms 3.77ms ⚪ 0.93% 7.17ms 7.14ms ⚪ -0.45% 🟡 90%

Link to pipeline

Copy link
Member

@Robbepop Robbepop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I just missed this PR. Thanks!

@Robbepop Robbepop merged commit e6d69fb into wasmi-labs:master Nov 24, 2022
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