wasmtime
wasmtime copied to clipboard
List of future optimizations for Wasm GC performance
This is a tracking issue collecting all of our ideas for improving Wasm GC performance and potential optimizations we could implement.
- [ ] https://github.com/bytecodealliance/wasmtime/issues/9347
- [ ] https://github.com/bytecodealliance/wasmtime/issues/9352
- [x] https://github.com/bytecodealliance/wasmtime/issues/9350
- [ ] https://github.com/bytecodealliance/wasmtime/issues/9349
- [ ] https://github.com/bytecodealliance/wasmtime/issues/9348
- [x] https://github.com/bytecodealliance/wasmtime/issues/5908
- [x] Const fold through
uadd_overflow_trap/trap{z,nz}insts that show up frequently in GC heap accesses. Depends on https://github.com/bytecodealliance/wasmtime/issues/5908 - [x] Also add a mid-end rule like
(uadd_overflow_trap (uextend x) (uextend y)) ==> (iadd (uextend x) (uextend y)). Depends on https://github.com/bytecodealliance/wasmtime/issues/5908 - [ ] Use bulk
memcpy-style APIs to implementarray.copywhen possible and do GC barriers inline when not possible - [ ] Expose type registry's supertypes arrays to Wasm, so it can do the O(1) subtype checks inline
- [ ] Propagate
trapzbackwards fromref.castinto the branch-y instance-of check that it emits. Similar for the jumps inside abr_on_cast[_fail]'s instance-of check. See https://github.com/bytecodealliance/wasmtime/pull/9437#discussion_r1795656924 for details. Alternatively, clean this stuff up in the mid-end: https://github.com/bytecodealliance/wasmtime/issues/6106 - [ ] Speed up
call_indirectin the face of subtyping. Much of this can be addressed by letting Wasm to the O(1) subtype checks inline, but it is still additional work to be done on everycall_indirectvs MVP wasm. We should investigate inline caches and such again.
Subscribe to Label Action
cc @fitzgen
This issue or pull request has been labeled: "wasmtime:ref-types"
Thus the following users have been cc'd because of the following labels:
- fitzgen: wasmtime:ref-types
To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.
See also https://github.com/WebAssembly/gc/issues/565 for potential benchmarks.