GCC Is Looking At Zstd For Compressing Its LTO Data

Written by Michael Larabel in GNU on 21 June 2019 at 05:56 AM EDT. 11 Comments
GNU
The latest use-case for the increasingly popular Zstd compression algorithm could be employment by the GNU Compiler Collection (GCC) for compressing its link-time optimization (LTO) data.

GCC currently makes use of Zlib for compressing the mass amount of data that comes about during the link-time optimization phase of the compiler process. But now SUSE developers have initiated the discussion over using Zstd in its place -- either requiring Zstd or making it optional and falling back to Zlib if not present on the system.

Martin Liška of SUSE sent out the initial proposal after seeing Zstd at its default compression level generated slightly smaller LTO ELF files than Zlib while the Zstd compression was four to eight times faster. A 4~8x speed-up for the compression process can be a measurable win as part of the LTO process for a large code-base. The decompression speed meanwhile is only sped up by a second or so for large code-bases. Zstandard also has the benefit of providing a much simpler API over Zlib.

There is the mailing list discussion where the upstream developers at large appear in favor of using Zstd for compression during LTO. However, there still are some open questions around whether to require Zstd / fall-backs for Zlib, it was even raised to potentially even use Zstd as part of the build process from source (though difficulties with Zstd using CMake by default), and other technicalities that will hopefully be overcome well in time for seeing this improvement make it for GCC 10.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week