Linked by Thom Holwerda on Thu 23rd Sep 2010 21:36 UTC, submitted by google_ninja
Permalink for comment 442524
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
News
Linked by Thom Holwerda on 05/20/13 21:50 UTC
Linked by Thom Holwerda on 05/19/13 23:15 UTC
Linked by Thom Holwerda on 05/19/13 23:11 UTC, submitted by Drumhellar
Linked by Thom Holwerda on 05/18/13 21:06 UTC
Linked by Thom Holwerda on 05/18/13 7:37 UTC
Linked by fran on 05/18/13 1:38 UTC
Linked by Thom Holwerda on 05/17/13 23:35 UTC, submitted by kragil
Linked by MOS6510 on 05/17/13 22:22 UTC
Linked by Thom Holwerda on 05/17/13 22:15 UTC, submitted by Tom
Linked by Thom Holwerda on 05/16/13 21:41 UTC
More News »
Sponsored Links



Member since:
2006-01-02
Actually, method JITs like v8 will never even approach native speed, and here's why. Native code knows the _type_ of the data it's manipulating, so it can pick the right assembly instruction at compile-time. But in Javascript, which is a dynamic language where types can change at any time during execution, that's not possible. So yes, v8 is an insanely fast method JIT for Javascript, but don't expect it to go at more than 10% of the speed of well-written native (say, C or C++) code.
The only way to get closer to native speed is to know the types at hand, and that was the goal of Tracemonkey, which is a loop tracing JIT. Tracemonkey analyses the actual types in hot loops and generates type-specialized code for them. When it succeeds, it goes closer to native speed than what any method JIT can ever hope to get. The disappointment is that it doesn't succeed all that often, because of the way that actual real-world Javascript behaves. But it's still worth keeping, especially with the growing importance of doing intensive computation in JS, and the introduction of Typed Arrays, especially in connection with WebGL. So in Firefox 4, we keep Tracemonkey, and in addition we add a new method JIT, Jaegermonkey. We try to trace (Tracemonkey) and when we fail, we have a second chance with Jaegermonkey.
Even if we restrict attention to JS performance only, that's not so clear. On v8's own benchmark, v8bench, indeed we're unlikely to beat them. But on sunspider (Webkit's benchmark) we are only 10-15% slower right now on x86 and we keep improving fast. On other benchmarks that give Tracemonkey a chance to trace, we win.
I know that Google has more workforce and more motivation to keep a lead on JS performance (to us, it's just one out of many goalsl; to them it's more crucial) so even if we beat them for a while they're likely to reclaim the lead shortly after. Just wanted to make it clear that right now we're on the verge of winning on sunspider.