3 ms·
In my experience things like PGO and LTO matter most in very large projects. Of course it depends on the codebase, but in general that's what I've seen. In ver
by azakai 13y ago
In my experience things like PGO and LTO matter most in very large projects. Of course it depends on the codebase, but in general that's what I've seen.
In very large projects, fully optimizing all the code is often unneeded, and bad because fully optimized code is larger (inlining, unrolled loops, etc.). PGO lets you find what actually needs to be optimized, and you can keep the rest compact to improve load times. Vice versa, PGO can tell you what code is run immediately on load so you can order it so that happens faster, etc.
Similarly, LTO is most useful in large projects where it is not obvious to the compiler how to optimize across compilation unit boundaries - as in a small enough project, either there are few such boundaries or it is easy to manually optimize for them.