PGO - AshokBhat/notes GitHub Wiki
PGO (Profile Guided Optimization)
- (aka Pogo, FDO, -fprofile-use)
Steps
- Instrument for profiling
- Run that instrumented executable in various scenarios
- Use the resulting performance profile to guide the compiler.
Usage
Microsoft
- Microsoft Windows heavily utilizes both LTO and PGO
- Windows sees 5-20% improvements from PGO
- https://lpc.events/event/7/contributions/771/attachments/630/1193/Exploring_Profile_Guided_Optimization_of_the_Linux_Kernel.pdf
Google Chrome
Apple
- Apple uses LTO extensively internally
- Typically 10% faster than executables from regular Release builds
- Multiplies with PGO
- Reduces code size when optimizing for size
- https://devstreaming-cdn.apple.com/videos/wwdc/2016/405i2ilotov3bazyei1/405/405_whats_new_in_llvm.pdf (Slide 107)