4 ms·
There are a few reasons why full speed is reached later when starting up in the emterpreter and swapping in asm.js later: * Compiling asm.js can use multiple C
by azakai 12y ago
There are a few reasons why full speed is reached later when starting up in the emterpreter and swapping in asm.js later:
* Compiling asm.js can use multiple CPU cores, so doing just that is faster than doing it while the emterpreter is running on (at least) one core.
* I believe, but am not sure, that compiling on a background thread is done at lower priority than stuff on the main thread.
* Swapping asm.js code in can only be done in between frames. At 10fps for example, that means around a 100ms delay just for that, and possibly more depending on the state of the browser's event queue.