Ask HN: How much faster can asm.js (realistically) get?
asm.js is really impressive. Engineering within limitations yet still producing something that runs http://beta.unity3d.com/jonas/AngryBots/
(Try in Firefox 29+ for best results)
https://hacks.mozilla.org/2014/05/asm-js-performance-improvements-in-the-latest-version-of-firefox-make-games-fly/
4 comments
[ 3.1 ms ] story [ 15.5 ms ] threadThe latency requirements prevent some of the more aggressive and time consuming optimizations from being attempted.
Obviously, those claims did not hold true in practice.
HotSpot has had some very talented people work on it. And Java bytecode is much more suited to such optimization than asm.js is, too. If it wasn't accomplished there, then it's doubtful it'll be done elsewhere.
So maybe it's theoretically possible, but we just haven't seen it happen in practice. There's little to suggest that it ever will happen, too.
From my point of view, in a near future, browsers will execute a language that will be statically typed, not garbage collected, with support of multi-threading (I mean real threads with shared memory, not webworkers), and mapping to SIMD units (AVX, SSE, NEON, ...). That day, there won't be any reason anymore for web apps to be slower than native apps. Plus, they will be a lot more power efficient than the javascript vm.