In my tests, sending to the Web IDE using console.log('a'); will add ~100msec each iteration, bogging down the sequencing. Have you tried without those lines? Don't forget the commented lines as those also are being parsed, adding unnecessary delay.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Fri 2019.04.12
In my tests, sending to the Web IDE using
console.log('a');
will add ~100msec each iteration, bogging down the sequencing. Have you tried without those lines? Don't forget the commented lines as those also are being parsed, adding unnecessary delay.