8 ms·
Wait.. I thought V8 doesn't support asm.js? Or are they comparing it against a fork of V8 which does support asm.js.. Because if they're saying the new webkit
by notthetup 12y ago
Wait.. I thought V8 doesn't support asm.js? Or are they comparing it against a fork of V8 which does support asm.js..
Because if they're saying the new webkit jsc (using asm.js) is faster than V8 (not using using asm.js), then it's not really a fair comparison.
- sanxiyn 12y agoOf course V8 supports asm.js. asm.js is just JavaScript. Okay, I know what you mean, but still why wouldn't it be a fair comparison? V8 is free to "support" asm.js, whatever "support" means.
- coldtea 12y agoHow about "it's not a comparison that matters"? Nobody will see any benefits from JSCore being "faster than V8 on asm.js". In fact, if JSC is slower on non asm.js code, the comparison would also be extremely misleading too, because 99.9999% of web code is NOT asm.js. At the moment it's like saying "JSC is faster than v8 on a synthetic benchmark almost nobody really uses in the actual world, and v8 hasn't bothered optimizing for".
- sanxiyn 12y agoObviously, people using asm.js will benefit from JavaScriptCore being faster than V8 on asm.js. Whether it matters is an interesting question, but V8 developers seem to disagree with you, because they included asm.js benchmark in Octane benchmark suite, which V8 developers use to tune V8.
- coldtea 12y ago>Obviously, people using asm.js will benefit from JavaScriptCore being faster than V8 on asm.js Also obviously I covered that, when I wrote "99.9999% of web code is NOT asm.js". So who are these "people"? All 10 of them? >Whether it matters is an interesting question, but V8 developers seem to disagree with you, because they included asm.js benchmark in Octane benchmark suite, which V8 developers use to tune V8. If anything, it shows that they agree with me. See how I compared asm.js to a "synthetic benchmark" in my comment?
- Drakim 12y agoI don't see why it's not a fair comparison? V8 doesn't have any specific optimizations for asm.js, opting instead to focus on optimizing JavaScript as a whole (which asm.js also benefits from). That's their choice, and this is the result of that.
- coldtea 12y ago>I don't see why it's not a fair comparison? Because nobody (for large values of "nobody") cares for asm.js. 99.999% of Javascript code out there is not asm.js, and nobody really uses it at the moment for production/business. Some PoC games mainly. So the fact that it beats V8 on something: a) V8 does not implement, b) requires specifically written (actually "compiled" from things like emscripten) JS code, c) is irrelevant at the moment for JS performance on the web, makes it pretty irrelevant itself.
- Drakim 12y agoMaybe irrelevant today, but maybe not irrelevant tomorrow. JavaScript is what the web "runs on", and if Firefox might in the future provide the fastest way to run JavaScript. Obviously for most cases that isn't going to be that relevant, but I can imagine a situation where you have Photoshop-in-the-browser and it runs better on Firefox due asm.js.
- sitkack 12y agoIt isn't irrelevant at all. Anyone is free to write high performance code that does the same things that emscripten does. "use asm"; Is a protocol convention. There isn't anything special about it. Everything is regular javascript and all javascript engines support it. I use it for non-game PoCs. Why do you care about V8 trying to be fast? Looks like JSC and Ion are beating them. JSC has no special "use asm" path.
- cpeterso 12y agoJSC does not implement asm.js any more than V8.
- azakai 12y ago
- pjmlp 12y agoWhy not? It is a plain JavaScript compiler optimization. Google could implement such optimizations as well, instead of spending their resources into NaCL and Dart VM.
- ahoge 12y agoV8 supports asm.js as any other ES3-compliant JavaScript engine. It also has many optimizations in place which benefit from asm.js-style code. Asm.js-style code also simply doesn't do those expensive JavaScript-y things. That's why that Citadel demo runs just fine in Chrome, too. However, V8 doesn't have a separate mode. The "'use asm';" pragma is ignored. The Octane benchmark suite does contain Emscripten and Mandreel benchmarks though. So, they are tracking it and they also try to make this kind of code run faster.
- hyperpape 12y agoNot only that, a few months after asm.js was included in Firefox, Chrome had optimizations done that helped a great bit with asm.js (http://blog.chromium.org/2013/05/chrome-28-beta-more-immersive-web.html http://blog.chromium.org/2013/05/chrome-28-beta-more-immersi...). Possibly a coincidence, but they certainly seem to care about asm.js performance above and beyond generic JS performance, even if they're not going to support the pragma.
- magicalist 12y ago> but they certainly seem to care about asm.js performance above and beyond generic JS performance That doesn't follow. They certainly care about it; it's now in the Octane benchmark suite, which means they think it's representative of code that should be optimized for, but it's only part of the suite, which means it's just one more style of code that should be able to run efficiently in a modern JS engine.
- Alphasite_ 12y agoYou're oth saying the same thing for the most part, I dont think he's trying to imply that its their focus, just that its important enough to optimise specifically.