Compiler optimizations are designed to optimize code humans write (or code humans write code to generate)
The neat thing with this "optimize for size" thought experiment is that as an executable you can bundle the decompressor, & use any compression format you want. This has a lot of prior art: https://en.wikipedia.org/wiki/Executable_compression
1 comment
[ 5.8 ms ] story [ 14.6 ms ] threadThe neat thing with this "optimize for size" thought experiment is that as an executable you can bundle the decompressor, & use any compression format you want. This has a lot of prior art: https://en.wikipedia.org/wiki/Executable_compression
In the table there's Crinkler, listed without any info. It's played a role in the demoscene: https://in4k.github.io/wiki/crinkler
GCC could implement an executable compressor as part of its size optimization, but it gets away from most of what GCC is. Unix philosophy, as they say