2 ms·
Actually, you can build small portions of an app with it. That's pretty much all you can do with it, for the very reasons you stated: no JS object access, no st
by Millennium 14y ago
Actually, you can build small portions of an app with it. That's pretty much all you can do with it, for the very reasons you stated: no JS object access, no strings, etc. All you can do is the same stuff you'd need assembly for anyway: super-tight inner loops that work over lots and lots of raw numeric data.
That's an important part of compiling C and C++ applications to run in the browser efficiently, but it's only one small part of the puzzle. C and C++ compilers put a lot of work into optimizing this same sort of code, and asm.js gives them a path to bring some of those optimizations to the browser. But no C/C++ application, even compiled with emscripten or the like, is ever going to be compiled solely to pure asm.js. It's just one part of a larger equation.