• Interesting - so even with shiftOut.bind(null,[R1,G1,B1,R2,G2,B2],{­clk:Clock}); it adds that 500uS each call? That's something I should look at as it should be extremely fast - it's basically just an array of 6 integers and really should be almost as quick as your use of getFromVar (since that involves a copy of all the pointers).

    Are you sure you're compiling with RELEASE=1? The assertions will slow it down, but they shouldn't be compiled in for release.

    It may be there's a bug in shiftout_fast that causes the corruption - could just be the way I implemented jshGetPinAddress on ESP32.

    found out that an uint8Array was slow compared to an simple JS Array, at least on ESP32

    It's slow for allocation, but shouldn't be slow for access. If you can get a good test example that is also slow on Espruino boards I'm very happy to look at it.

    18msec vs 26msec

    That's an interesting slowdown - I guess it could just be my use of jsvIterateCallback vs your direct iteration from the pointer? It may be something I could special-case in jsvIterateCallback for byte arrays, which would improve a whole lot of stuff


Avatar for Gordon @Gordon started