You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There has been little effort put into optimizing the the IR to produce fast executable bytecode. Some ideas that we should try similar to Wasmi, wasm3, wamr-fast, wasmtime. I've sorted these in sort of priority and feasibility:
Register-based IR. The idea here is to drop local_get and local_set to write directly to/from the stack as well as operate directly from the stack for other instructions. Wasmi has done a lot of great work in this area, we should see if we can leverage this and still maintain decoding in a single streamed-pass.
I'm hesitant around the wasm3 approach since it sort of breaks the "no native stack" requirement of the interpreter but we should look at it closer to validate that assumption. This may also depend on Explicit Tail Calls rust-lang/rfcs#3407.
Wasmtime has the Cranelift single-pass JIT winch. This would probably imply a ground up implementation. This is a separate proposal on it's own but I'm folding it in here as a long term idea.
I could not find any academic papers which will make this harder.
This also may break encapsulation so we would have it as a compile-time optional feature. This is useful for trusted executable code that we want to run in a sandbox for portability reasons
There has been little effort put into optimizing the the IR to produce fast executable bytecode. Some ideas that we should try similar to Wasmi, wasm3, wamr-fast, wasmtime. I've sorted these in sort of priority and feasibility:
local_getandlocal_setto write directly to/from the stack as well as operate directly from the stack for other instructions. Wasmi has done a lot of great work in this area, we should see if we can leverage this and still maintain decoding in a single streamed-pass.