You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • sending to the Web IDE using console.log('a'); will add ~100msec each iteration,

    This definitely isn't the case by the way - if you don't fill the output buffer then it's pretty fast. Obviously if you fill the buffer then you're limited by the time it takes to send that data over USB/Bluetooth/Serial/etc.

    Also, which firmware version are you using? If it's a firmware build that has been done without the RELEASE flag set then it'll have asserts all over it and will be an order of magnitude slower.

    Just to add some actual stats to this:

    var arr = new Uint8ClampedArray(100*3);
    var pos = 0;
    function getPattern() {
      pos++;
      for (var i=0;i<arr.length;i+=3)
        arr.set(E.HSBtoRGB((i+pos)*0.01,1,1,1),i­);
    }
    t=getTime();getPattern();print(getTime()­-t)
    // prints 0.12677001953 on an MDBT42Q
    // prints 0.08190917968 on an Espruino WiFi
    

    So official Espruino boards would appear to be 'fast enough', if not as fast as Arduino/Micropython.

About

Avatar for Gordon @Gordon started