[英]When asm.js is faster than normal JS code, why should I write new code in JS?
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? Emscripten可以从C / C ++生成比用手写的JS代码更快的代码,这是否意味着我们应该用C / C ++编写新代码并编译它们以在Web上运行?
I read the Emscripten FAQ, it says "By all means write new JavaScript code.", why is that? 我阅读了Emscripten FAQ,它说“通过各种方式编写新的JavaScript代码。”,为什么会这样?
asm.js is not a faster way to execute Javascript-esque code. asm.js不是执行Javascript-esque代码的更快的方法。 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: 我期望从asm.js中获得足够多的代码是:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.