3 ms·
Asm.js already runs on V8. It's just not fast. If you want to see if/when asm.js becomes fast in V8, see https://code.google.com/p/v8/issues/detail?id=2599 http
by kjksf 12y ago
Asm.js already runs on V8. It's just not fast. If you want to see if/when asm.js becomes fast in V8, see https://code.google.com/p/v8/issues/detail?id=2599 https://code.google.com/p/v8/issues/detail?id=2599
However, you don't seem to understand what asm.js is.
Asm.js is not JavaScript.
Syntactically it does look like JavaScript but it's really bytecode emulating CPU in JavaScript clothing.
As such asm.js is used to execute C code bases cross-compiled to asm.js with a tool like emscripten.
There is no such thing as "compiling JavaScript to asm.js" because there's no point. V8 (and every other modern JS VM) already compiles JavaScript to optimized CPU instruction set so it doesn't make sense to do JavaScript -> asm.js -> CPU instructions set.
To re-iterate: asm.js targets the same use case as p(nacl) i.e. compiling C/C++ code bases to something that can be executed in the web.
See http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html for more info.
- marcosscriven 12y agoasm.js certainly is Javascript - that's a very important aspect of it. From http://asmjs.org/ http://asmjs.org/: "an extraordinarily optimizable, low-level subset of JavaScript"
- Pharohbot 12y agoOkay since Js cant be compiled to asm.js, would asm.js(when its actually fast) make V8 fast enough to outperform the DartVM for example?