3 ms·
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 ev
by bnjohnny 12y ago
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++?
- Scaevolus 12y agoYou 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.
- Pacabel 12y agoThose 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.