Does profile guided optimisation work and is it worth the hassle?
Recently, while exploring Python’s code base I stumbled upon these cryptic lines in its build system. I’ve never used profile guided optimisations before so, that led me into a goose chase to learn more about them. This post is about how to use clang to employ these optimisation techniques in practice and how much performance gains can be achieved (if any).
What’s profile guided optimisations (PGO)?
The main principles behind PGO can be described as:
