Hi. I've written a patch draft that replaces zlib with the zstd compression algorithm ([1]) in LTO. I'm also sending statistics that are collected for couple of quite big C++ source files. Observation I did: - LTO stream compression takes 3-4% of LGEN compile time - zstd in default compression level (3) generated slighly smaller LTO elf files - zstd compression is 4-8x faster - decompression is quite negligible, but for a bigger project (godot) I can reduction from 1.37 to 0.53 seconds - ZSTD API is much simpler to use Suggestion based on the observation: - I would suggest to make zstd optional (--enable-zstd) and one would use #include + -lzstd - I like the default level as we want to mainly speed up LTO compilation - we can provide an option to control algorithm (-flto-compression-algorithm), similarly to -flto-compression-level - we can discuss possible compression of LTO bytecode that is distributed between WPA stage and individual LTRANS phases. Thoughts? Thanks, Martin [1] https://github.com/facebook/zstd