2 ms·
How optimized is the generated code? One of the benefits of using LLVM is the amazing set of optimization passes, after all. Will Onyx have to reimplement a lot
by royjacobs 3y ago
How optimized is the generated code? One of the benefits of using LLVM is the amazing set of optimization passes, after all. Will Onyx have to reimplement a lot of these optimizations?
- brendanfh 3y agoThe compiler does not have many optimizations currently implemented. Currently, the compilers just uses constant folding and generally reducing unneeded operations if possible. There are plans to do function inlining and better tree-shaking, but those are a ways out. The "nice" thing about WebAssembly is that the job of generating optimized machine-instructions is up to the WASM embedder, which Wasmer is doing very well right now. Onyx does have a second runtime that is currently only implemented for x86_64 Linux, that does have some more optimizations, but it does not compile to native code; just to an interpreted byte-code.