You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • It's not an entirely fair comparison if you've got x=0 in the for loop but not in any other loops, but I believe for will be slower anyway, just because Espruino is having to jump between 3 different places (the loop iterator, condition and body)...

    The fastest would be:

          var i = LOOPS;
          while (i--) {
          }
    
About

Avatar for Gordon @Gordon started