For small graphical items (line drawing, font glyphs) the performance
of the set_window() method is critical.
Emit native code for this function and optimize the SPI write_cmd()
method to avoid memory allocation. This give a performance boost of
a little over 15% for (24pt) font rendering and 30% for line drawing.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
There's a bunch of different changes here but there are only really three
big wins. The biggest win comes from restructuring the 2-bit RLE decode
loop to avoid the inner function (~20%) but the switch to 16-bit writes in
_fill() and adoption of quick_write (e.g. no CS toggling) are also
note worthy (and about 5% each).
This makes line-by-line drawing more efficient because don't have to
handle the dc line. The optimization targets font rendering and if good
for slightly less than 10% rendering improvement.
Migrate the filling of the line buffer into a seperate function.
This does naturally reduce the cost of the loop management but
much more importantly allows us to use viper native code
generator.