This optimization is perfect for drawing horizontal lines
Display 240x240(320)
before: 990ms, after 266ms
hLines = () =>{ g.clear().setColor(0xfffff); xm = 240; ym = 240; t1 = Date.now(); for ( var y = 0; y <= ym; y+=10){ g.drawLine(0,y,xm,y); } t2 = Date.now()-t1; g.setColor(0xff0).setFont("6x8",2).drawString(t2.toFixed()+"ms",0,0,true); };
I guess it should be possible to optimize this for vertical line too?
@MaBe started
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.
This optimization is perfect for drawing horizontal lines
Display 240x240(320)
before: 990ms, after 266ms
I guess it should be possible to optimize this for vertical line too?