For 99% of us that's just an implementation detail anyway. Although I remember reading that Firefox can compile wasm faster than normal network transfer rates so maybe AOT makes more sense there.
We do streaming baseline compilation as fast as the network can hand us bytes, but we also kick off a more optimized compilation in a background thread.
A lot of optimizations can be baked into the generated wasm, but you still need to spend some time doing eg register allocation.
> A lot of optimizations can be baked into the generated wasm, but you still need to spend some time doing eg register allocation.
Such a shame WASM is a stack machine. If it wasn't we could have had fast, singlepass compilation with near native performance without any complex optimizing recompilers or multi level JITs.
(This is not speculation. I actually wrote a VM which executes code as fast as wasmtime but compiles 160 times faster and guarantees O(n) compilation.)
IainIreland|2 years ago
A lot of optimizations can be baked into the generated wasm, but you still need to spend some time doing eg register allocation.
kouteiheika|2 years ago
Such a shame WASM is a stack machine. If it wasn't we could have had fast, singlepass compilation with near native performance without any complex optimizing recompilers or multi level JITs.
(This is not speculation. I actually wrote a VM which executes code as fast as wasmtime but compiles 160 times faster and guarantees O(n) compilation.)