cfallin opened issue #12111:
In #12051 we added a new level of data structures to the per-store module registry due to the distinction between
EngineCodeandStoreCode. This leads to a small but consistent observed increase in instantiation time (~3% or 40ns in tests with a store of one small module).In theory we could avoid the cost of materializing a separate
StoreCodeby makingModuleWithCodecarry a view on some text/range, and building it to useEngineCode's text slice directly in the non-debug case. The commit here did enough of this to avoid a lookup in the engine-to-store-code map on the funcref init path, but we could carry it a bit further and avoid creating aStoreCodeat all at instantiation.There may be other optimizations we could do as well, after profiling.
alexcrichton added the wasmtime label to Issue #12111.
alexcrichton added the performance label to Issue #12111.
Last updated: Dec 06 2025 at 06:05 UTC