2 ms·
Answered in asm.js FAQ: "Q. Why not just keep optimizing JavaScript JIT compilers instead? A. No need to stop! But JIT compilers have less predictable perform
by acqq 10y ago
Answered in asm.js FAQ:
"Q. Why not just keep optimizing JavaScript JIT compilers instead?
A. No need to stop! But JIT compilers have less predictable performance based on complicated heuristics. The asm.js model provides a model closer to C/C++ by eliminating dynamic type guards, boxed values, and garbage collection.
Q. Isn't it inefficient to have to run the code through a JavaScript interpreter before compiling?
A. Because of the directive prologue, a JavaScript engine can immediately recognize asm.js code at compile-time and immediately compile it to assembly language, with no need to ever run the code through an interpreter."