True.
Looking at the setpixel method it should also be possible to write a variant that iterates over a list of values, e.g. [x1,y1,colour1, x2,y2,colour2, ...] or arrays of x, y and colour. Then the validity checks are called once per method invocation regardless of the number of colour assignments. That might be sufficient for the example in the OP.
In reply to Re^3: Double the speed of Imager->setpixel
by swl
in thread Double the speed of Imager->setpixel
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |