Evaluate using Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) for Gnome projects

Hi!

I am collecting a lot of resources about Profile-Guided Optimization (PGO) effects on different software (compilers, databases, browsers, log solutions, operating systems, etc.) - all the results are available at GitHub - zamazan4ik/awesome-pgo: Various materials about Profile Guided Optimization and other similar stuff like AutoFDO, Bolt, etc. .

I have several ideas of how PGO can be interesting to the Gnome project:

  1. Optimize Gnome software with PGO. In this case, Gnome users can get better performance and responsiveness for their applications. Battery life also can be improved. PGO can be applied to different parts of the Gnome project: the Gnome desktop environment itself, different Gnome software under the Gnome umbrella, etc. At first, I can suggest trying to evaluate PGO effects on the software, and if it shows measurable performance improvements - try to integrate PGO into the build scripts. In this case, it would be much easier for maintainers to enable PGO for Gnome during the build process.
  2. Optimize Gnome’s CI system with PGO. E.g. GCC and Clang get up to +20% compilation speed with PGO. This can be valuable for the project since it can improve the developers’ experience (faster build times) and reduce costs for the CI system.

As far as I understand, right now the only thing in Gnome that is compiled with PGO is SpiderMonkey (but even for this I am not sure - is PGO enabled for SpiderMonkey or not). I believe that PGO can be enabled for a variety of other Gnome projects with valuable performance improvements.

The same ideas apply to Post-Link Optimization (PLO) too like LLVM BOLT (llvm-project/bolt/README.md at main · llvm/llvm-project · GitHub) but I recommend starting with PGO and only after that trying to play with PLO.

I would be happy to answer all your questions about PGO and PLO.

Thank you.

P.S. We already discussed this topic a bit on FOSDEM 2024 - that’s why I created the issue here :slight_smile: