abrown opened PR #5274 from bench-wasi
to main
:
In order to properly understand the impact of providing thread-safe
implmentations of WASI contexts (https://github.com/bytecodealliance/wasmtime/issues/5235), we need benchmarks that measure
the current performance of WASI calls using Wiggle. This change adds
several common WASI scenarios as WAT files (seebenches/wasi/*.wat
)
and benchmarks them withcriterion
. Usingcriterion
'siter_custom
,
the WAT file runs the desired number of benchmark iterations internally
and the total duration of the runs is divided to get the average time
for each loop iteration.Why WAT? When compiling these benchmarks from Rust to
wasm32-wasi
, the
output files are large, contain other WASI imports than the desired
ones, and overall it is difficult to tell if we are measuring what we
expect. By hand-writing the WAT, it is (slightly) more clear what each
benchmark is doing.
@abrown
abrown committed
abrown edited PR #5274 from bench-wasi
to main
:
In order to properly understand the impact of providing thread-safe
implmentations of WASI contexts (https://github.com/bytecodealliance/wasmtime/issues/5235), we need benchmarks that measure
the current performance of WASI calls using Wiggle. This change adds
several common WASI scenarios as WAT files (seebenches/wasi/*.wat
)
and benchmarks them withcriterion
. Usingcriterion
'siter_custom
,
the WAT file runs the desired number of benchmark iterations internally
and the total duration of the runs is divided to get the average time
for each loop iteration.Why WAT? When compiling these benchmarks from Rust to
wasm32-wasi
, the
output files are large, contain other WASI imports than the desired
ones, and overall it is difficult to tell if we are measuring what we
expect. By hand-writing the WAT, it is (slightly) more clear what each
benchmark is doing.
jameysharp submitted PR review.
jameysharp submitted PR review.
jameysharp created PR review comment:
// `instantiate` for details).
jameysharp created PR review comment:
Since all the type parameters are the
_
wildcard, is the::<_, _, _>
necessary? I'd have guessed "no", but I don't know.
abrown updated PR #5274 from bench-wasi
to main
.
abrown submitted PR review.
abrown created PR review comment:
Good point, fixed...
abrown has marked PR #5274 as ready for review.
abrown merged PR #5274.
Last updated: Nov 22 2024 at 16:03 UTC