4 ms·
> > an offline compiler like Clang can spend considerably more time to generate better code, whereas WebAssembly compilers must be fast enough to run online ht
by PudgePacket 7y ago
> > an offline compiler like Clang can spend considerably more time to generate better code, whereas WebAssembly compilers must be fast enough to run online
https://hacks.mozilla.org/2018/01/making-webassembly-even-faster-firefoxs-new-streaming-and-tiering-compiler/ https://hacks.mozilla.org/2018/01/making-webassembly-even-fa...
> One of these speedups is streaming compilation, where the browser compiles the code while the code is still being downloaded. Up until now, this was just a potential future speedup. But with the release of Firefox 58 next week, it becomes a reality.
> Firefox 58 also includes a new 2-tiered compiler. The new baseline compiler compiles code 10–15 times faster than the optimizing compiler.
Seems to deal with the "whereas WebAssembly compilers must be fast enough to run online"
- azakai 7y agoStreaming and tiering do help, and I believe all browsers do that. Still, the article's point is valid that offline compilers can spend more time compiling, because even if you have a faster tier before you, running a slower compiler eats up battery and increases the time before the code runs at full speed.