Re:Ask HN: How much faster can asm.js (realistically) get?
by bnjohnny on Saturday May 17, 2014 @09:03PM
(#7761754)
Is it possible that asm.js, since it's compiled dynamically on the client (giving access to more information potentially leading to better optimizations) can eventually out perform c/c++?
[ Parent
| on HN ]
Re:Ask HN: How much faster can asm.js (realistically) get?
by Scaevolus on Saturday May 17, 2014 @09:31PM
(#7761815)
You can do "profile-guided optimizations" in C++ as well. It's easier to exploit CPU capabilities (e.g. AVX) if you run the compiler on the client side, but once again compilers can do the same.
The latency requirements prevent some of the more aggressive and time consuming optimizations from being attempted.
Re:Ask HN: How much faster can asm.js (realistically) get?
by Pacabel on Saturday May 17, 2014 @10:38PM
(#7761947)
Those of us who have been around for a while will remember hearing that claim made about the JVM back in the late 1990s, back when HotSpot came onto the scene.
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.