Empirical Observations about Profile-Guided Optimizations for Mainstream C/C++ Compilers
summary
Empirical study compares GCC and Clang PGO on MiBench x86-64 using 27 programs, 20 inputs each and an instrumentation-based offline PGO workflow; each experiment runs 12 times and uses the NSA gRA disassembler to normalize and count function variants. Results: GCC averages +8% vs O3, Clang +4%; nonrepresentative profiles can hurt up to ~14%; same-profile is best only ~50% of cases and can be 2.7–3.1% worse than PGO-best; 5,854 functions analyzed with 87.9% showing ≤2 variants on LLVM.
AI-written summary · about
chapters (11)
- 0:00Profile-guided optimizations intro
- 4:42Experimental setup
- 8:38Performance across compilers
- 10:27Ideal profile limits
- 11:33Profile tradeoffs
- 12:15GCC vs LLVM correlation
- 12:55Profile-induced code variance
- 15:03Control flow optimizations
- 16:32Small set best performance
- 17:36Summary and future work
- 18:45Q&A
related talks
34mThe basics of Profile-Guided Optimization (PGO) in Rust
15mNot So Fast: Understanding and Mitigating Negative Impacts of Compiler Optimizations on Code Reuse G
30mProfile-Guided Optimization (PGO) in Rust: unknown parts
06mProfile-Guided Optimization in the Go Compiler
54mGCC/Clang Optimizations for Embedded Linux
22mProfile Inference Revisited
19mExploiting Undefined Behavior in C/C++ Programs for Optimization: A Study on the(…)
52mUnderstanding Compiler Optimization
