dos33fsprogs/demos/second/part18_3d/auto/NOTES

41 lines
1.2 KiB
Plaintext

frame50 as benchmark:
+ raw binary is 1024 bytes (2048 pixels)
hand-crafted:
+ 25e0 - 24d8 = 264 bytes
todo, compressed:
+ ???
7680 bytes: try1: all plots, even zeros (4 bytes each pixel)
4537 bytes: try2: all plots, don't write black pixels
3701 bytes: try3: only do color if it changes
2568 bytes: try4: use compact form (only change type if changed)
1194 bytes: try5: use hlin (essentially RLE)
906 bytes: try6: sort by color first
628 bytes: try7: initial use boxes
526 bytes: try8: boxes that optimize to HLIN/VLIN/PLOT
522 bytes: try9: optimize HLIN to HLIN_ADD variants
506 bytes: try10: sort types per color
498 bytes: try11: sort HLIN by Y1
431 bytes: try12: with don't cares
336 bytes: try13: sort colors by popularity
299 bytes: try14: shrink the window for finding colors to only include colors
299 bytes: try15: sort BOX (not expected to be smaller)
293 bytes: try16: add BOX_ADD types
293 bytes: try17: permutate the top 4 colors to see if it improves
TODO:
Only use don't care result if not wider than max X or longer than
max Y
sort BOX and do optimizations like HLIN
Try all color combos?
K-permutations. For K=16 it's literally billions+?
Maybe try just top 4? Only 24 combos then?
MOVE PLOTS one line before HLIN?