2 ms·
> once by the wasm runtime to compile the rust-python wasm I'm not sure what you mean by that. The runtime doesn't compile WASM, it simply executes it. There
by hobofan 3y ago
> once by the wasm runtime to compile the rust-python wasm
I'm not sure what you mean by that. The runtime doesn't compile WASM, it simply executes it.
There are tools for dealing with interpreter runtime overhead this by pre-initalizing the environment like Wizer[0]. ComponentizeJS[1] uses it to pre-initialize the Spidermoney engine it packages to gain fast startup times (and you can then prune the initialization only code with wasm-opt). As techniques like ComponentizeJS are also being applied for a specific set of interpreted files, you can even prune parts of the interpreter that would never be used for that specific program. If you want to go even further you could record specific execution profiles and optimize based on those.
[0]: https://github.com/bytecodealliance/wizer https://github.com/bytecodealliance/wizer
[1]: https://github.com/bytecodealliance/ComponentizeJS https://github.com/bytecodealliance/ComponentizeJS
- crabmusket 3y ago> The runtime doesn't compile WASM, it simply executes it. That's not necessarily true. For example, Wasmtime uses Cranelift to compile WASM binary into native code. https://docs.wasmtime.dev/contributing-architecture.html https://docs.wasmtime.dev/contributing-architecture.html