Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

TLDR -- PGO reduces build times by 10-16% but is not straightforward to realize in CI.


Why isn't it straightforward, isn't autofdo automating the process?


> 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).


Autofdo if automatically called by the rust toolchain should alleviate the first point https://github.com/google/autofdo (though it only work on Linux)

How much percent slower is the build time with PGO on average?


It 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: