Emscripten could generate faster code from C/C++ than JS code wrote by hands, so is that means we should write new code in C/C++ and compile them to run on Web?
I read the Emscripten FAQ, it says "By all means write new JavaScript code.", why is that?
asm.js is not a faster way to execute Javascript-esque code. It is a faster way to run code which is already reduced to the level of abstraction of machine code. You seem to greatly overestimate the gains:
Going this route has significant downsides as well:
The only kinds of code which I expect to gain enough from asm.js to use are:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.