3 ms·
I agree with mraleph that this is possible. But it has not happened yet: if you look at the slide linked to there, https://v8.googlecode.com/issues/attachment?
by azakai 13y ago
I agree with mraleph that this is possible. But it has not happened yet: if you look at the slide linked to there,
https://v8.googlecode.com/issues/attachment?aid=25990016000&name=asm-benchmarks.png&token=h4vTA5HJV-Lh78OlhdyF4312yuA%3A1381857693963&inline=1 https://v8.googlecode.com/issues/attachment?aid=25990016000&...
you can see that on a few of those there is still a significant difference, for example on Lua (I filed an issue on that here http://code.google.com/p/v8/issues/detail?id=2873 http://code.google.com/p/v8/issues/detail?id=2873 ).
In principle, a JIT can do anything an AOT compiler can (and more). In practice, the JITs in Chrome and Firefox have gotten close to what the asm.js AOT in Firefox can reach, but only on most benchmarks, not all. The AOT does give a fairly good guarantee of always running the code at a good speed, while the JITs depend on heuristics. In practice, this means that JITs can be tweaked to run any benchmark well, but they don't always do it out of the box, while the AOT far more often does do so.
Again, JIT heuristics can be fixed and improved, I have no doubt about that. And JITs could be designed to rely less on heuristics, I am a strong believer in that as well. But neither of those has yet been proven. I hope they will, though :)