Currently when a codel dimension of n is specified (the --dim flag), the Printer module creates the image in a stupid manner; it first fills one pixel, then copies that over to the n-1 pixels in its column, then copies that column n-1 times across the row. This fills one entire codel. Rinse and repeat for all codels.
It seems that whenever codel size > pixel size, this takes up, by far, the most time during codegen, despite being a relatively silly thing.
It would be better if we had power-of-2 based copying, i.e., copy 1 → copy 2 → copy 4 → ... instead. Of course, one needs to properly check for the edge cases, e.g. when the codel edge size is not an exact power of 2.
Implementing this (assuming we get the appropriate codegen speedup) would make using the default settings (1 codel = 8x8 pixels) much less painful to use for small programs.
Currently when a codel dimension of
nis specified (the--dimflag), thePrintermodule creates the image in a stupid manner; it first fills one pixel, then copies that over to then-1pixels in its column, then copies that columnn-1times across the row. This fills one entire codel. Rinse and repeat for all codels.It seems that whenever codel size > pixel size, this takes up, by far, the most time during codegen, despite being a relatively silly thing.
It would be better if we had power-of-2 based copying, i.e., copy 1 → copy 2 → copy 4 → ... instead. Of course, one needs to properly check for the edge cases, e.g. when the codel edge size is not an exact power of 2.
Implementing this (assuming we get the appropriate codegen speedup) would make using the default settings (1 codel = 8x8 pixels) much less painful to use for small programs.