fitzgen opened issue #11163:
Right now we call through a
dyn RuntimeLinearMemoryto get theVMMemoryDefinitionevery time we index into the heap, including in the tracing and decref'ing inner loop. It can only change when we grow the memory, which can only happen when the memory is taken out of the GC heap and then replaced, so we can just update the cache every time it is replaced. This should remove a bunch of indirect calls and let LLVM inline and GVN and etc more stuff.
fitzgen added the performance label to Issue #11163.
fitzgen added the wasm-proposal:gc label to Issue #11163.
fitzgen closed issue #11163:
Right now we call through a
dyn RuntimeLinearMemoryto get theVMMemoryDefinitionevery time we index into the heap, including in the tracing and decref'ing inner loop. It can only change when we grow the memory, which can only happen when the memory is taken out of the GC heap and then replaced, so we can just update the cache every time it is replaced. This should remove a bunch of indirect calls and let LLVM inline and GVN and etc more stuff.
Last updated: Dec 06 2025 at 07:03 UTC