3 ms·
I don’t understand. JS can’t be precompiled, so the interpreter would still be doing JIT compilation (or be very slow?)
by Jaxkr 7y ago
I don’t understand. JS can’t be precompiled, so the interpreter would still be doing JIT compilation (or be very slow?)
- tinus_hn 7y agoIn iOS a block of memory that is writeable cannot become executable. The only blocks of memory that can be executable are those loaded from disk. So you can’t compile Javascript code to machine code, write it to memory and then run it. An interpreter instead just runs the code step by step. If the next statement is this command, run this function. If it’s a jump continue interpreting from somewhere else. That’s slower but the processor never directly runs machine code that wasn’t already in the package.