3 ms·
> You might also get a performance increase by just replacing the optimizing compiler wholesale with LLVM? I can't speak directly to this, but I'm sure if it w
by ndesaulniers 13y ago
> You might also get a performance increase by just replacing the optimizing compiler wholesale with LLVM?
I can't speak directly to this, but I'm sure if it was worth it, the Spidermonkey and V8 teams would have done it already.
- comex 13y agoI doubt it. Such a replacement would be a huge effort to write (including integrating it with the existing VM) and maintain, and there are also political factors. Despite those, I don't think it's out of the question that it will happen some day, especially as Chrome already has a copy of LLVM, though I do think it's less relevant than the other stuff I mentioned. edit: azakai has a better answer :)
- ndesaulniers 13y agoSure it definitely would be a lot to implement _now_, but llvm was released roughly 5 years before v8. The v8 team totally could have chosen it for a compiler back end (code generation). My observation was simply that they didn't, and I believe there probably was a reason for it (though I can't speak to it). In hindsight, it probably would've made more sense for Google to utilize llvm as a compiler IR in v8 than as a virtual machine as in PNaCl. [1] [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043719.html http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/0437...
- azakai 13y agoIt is very hard to do, and LLVM has been difficult to use as a JIT in past projects (Unladen Swallow, for example). However, Apple is experimenting with this in their FTL (fourth tier LLVM-based) JIT project in JSC. Because Apple drives both JSC and LLVM, this has the highest chance of success of any similar project, I believe, so it is very interesting to watch.