4 ms·
TLDR -- PGO reduces build times by 10-16% but is not straightforward to realize in CI.
by ibraheemdev 6y ago
TLDR -- PGO reduces build times by 10-16% but is not straightforward to realize in CI.
- The_rationalist 6y agoWhy isn't it straightforward, isn't autofdo automating the process?
- ibraheemdev 6y ago> Unfortunately, bringing these improvements to end users is not as simple as adding a few compiler flags to our dist builds. PGO is different from most other optimizations in that it: - requires a different, extended build workflow due to the additional instrumentation and data collection phases, and - it incurs a sustained build time cost (a trait it shares with other automated optimizations like LTO).
- The_rationalist 6y agoAutofdo if automatically called by the rust toolchain should alleviate the first point https://github.com/google/autofdo https://github.com/google/autofdo (though it only work on Linux) How much percent slower is the build time with PGO on average?
- oscardssmith 6y agoIt depends. The thing that makes pgo good is that it bases it's compile off of analysis of runtime behavior. For that to work, you have to run the problem long enough to get a representative sample. For some programs, that can be a big speed decrease.