4 ms·
The point I was trying to get across is that by cross-compiling from C/C++ with Emscripten, static type information can be used to give native performance, that
by marcosscriven 12y ago
The point I was trying to get across is that by cross-compiling from C/C++ with Emscripten, static type information can be used to give native performance, that a program written directly in Javascript wouldn't. It's still AOT in that sense - it's not like JIT where only hot bits of code get converted to native to code, and only then when some heuristics have determined what actual types the code ends up dealing with at runtime.
- pjmlp 12y agoBut it isn't AOT in CS speak.
- marcosscriven 12y agoI'm not sure how you claim to be the authority on 'CS speak', but it's a sufficiently blurred line here, for reasons I clearly explained and which you seem unable to understand. Emscripten/asm.js can use static information to generate Javascript which can be compiled to native code, before the code in question is run, aka Ahead of Time.
- pjmlp 12y agoWell, I majored in compiler design. Ahead of time compilation is used to describe the process of generating machine code at compilation time, in a form that can be executed directly by a processor without any additional transformation process. Which clearly is not happening here, as the code is converted into JavaScript and relies on a JavaScript implementation to run. Regardless of the optimization processes used by the JavaScript engine.
- marcosscriven 12y agoThe nuances unfortunately appear to escape you.