Re:Firefox’s new streaming and tiering compiler
by jnordwick on Wednesday January 17, 2018 @12:37PM
(#16169913)
Considering the major optimization in compiling is inlining, knowing the function body is very important to compilation, but I guess that can be pushed off until the next tier.
[ Parent
| on HN ]
Re:Firefox’s new streaming and tiering compiler
by kllrnohj on Wednesday January 17, 2018 @01:09PM
(#16170207)
WebAsm is an intermediate not a source language. Initial in-lining & other optimization have already been performed long before it hit your browser. There could potentially be a JIT or similar to do a secondary optimization pass in the browser if something is hot, but it's probably going to be largely considered a codegen issue rather than a runtime issue.
Re:Firefox’s new streaming and tiering compiler
by callahad on Wednesday January 17, 2018 @12:57PM
(#16170106)
Don't forget about the local compilation phase from C/C++/Rust to WebAssembly before you ever hit the browser. At that point, LLVM is free to optimize and inline just like with any other binary target.
Re:Firefox’s new streaming and tiering compiler
by rcthompson on Wednesday January 17, 2018 @12:51PM
(#16170059)
I imagine the first pass could inline functions that are already compiled and skip functions that have yet to be compiled. Maybe tools that generate wasm will start reordering the functions they send to allow optimal first-pass inlining.