Re: Compiling binaries with PGO
- Date: Mon, 9 Jul 2018 12:57:44 +0200
- From: Matthias Klose <doko@xxxxxxxxxx>
- Subject: Re: Compiling binaries with PGO
On 09.07.2018 12:13, Alexander Zaitsev wrote:
As far as I know binaries in Debian repositories most binaries are compiled without
PGO (profile-guided optimization). Also I don't know any LInux-based OS
where all (or significant part) binaries are precompiled with PGO. With PGO we
performance of binaries for typical use-cases without compiling for some
specific architecture (so binaries with PGO will be architecture-independent).
Question: why PGO isn't used by maintainers for packages? Lack of
profile data for compilation with PGO? Isn't interested for
mainatainers? Lack of build resources? Something else? Will you try to use PGO
for your packages,
if will be available repository with profile data for different
applications, where you can pick profile data for your application,
recompile package with this information and, probably, increase
performance of your application?
it is used to some extent. E.g. the python interpreter packages are built using
PGO/LTO optimization on some architectures, and some upstreams support building
using PGO as well. You need to find some way to create the profile data, which
usually requires some extra packaging work. There is also autofdo, using a more
general profile data format suitable for both GCC and LLVM, so you could try to
include that data into the packaging, and use it in the build process.
Don't assume too much speed improvements. I usually see around 3-6%.