call inner loop in coarser chunks to mitigate asm.js call overhead; also, increase the framerate