]> git.draconx.ca Git - rrace.git/commitdiff
Performance improvements for runtime icon generation.
authorNick Bowler <nbowler@draconx.ca>
Thu, 12 Jan 2023 05:51:41 +0000 (00:51 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 12 Jan 2023 06:22:37 +0000 (01:22 -0500)
As most of the rows for any given icon tile are the same as the
previously-generated row, it is not necessary to recompute the
colour values every single time.  The code can be adjusted to
re-use the previously-computed row instead.

Since the generic code now works on bytes, we can also replace the
open-coded loops in the row generation with a couple of memset calls,
which should help modern compilers produce more efficient output.

All this reduces the amount of computation done by the generic code
substantially, to roughly a quarter of what it was previously.

Also take the time to remove some unneeded complexity in the EWMH
formatting implementation, which further helps a little bit on the
code size front.


No differences found