Originally posted by Paradigm Shifter
View Post
Announcement
Collapse
No announcement yet.
GCC 11 PGO With The AMD Ryzen 9 5950X For Faster Performance
Collapse
X
-
Originally posted by Paradigm Shifter View PostYeah, I understand that. But compiling twice (something which takes about 10 minutes) is definitely worth it if it shaves 10% of the runtime off a program for which a single run will often be weeks.
It's trivial for a benchmark, because you can just run it. But most apps have tons of functionality and you have to decide how much of it you can setup tests for, and whether some parts need to be focused on more while rare functionality is ignored in order to avoid mis-prioritizing it. If you do a PGO build with bad data, you can easily end up with an app that runs slower rather than faster.
- Likes 3
Comment
-
Originally posted by smitty3268 View PostIf you do a PGO build with bad data, you can easily end up with an app that runs slower rather than faster.
It's not as if it is making 'non-touched' code slower, it just doesn't have the runtime data for it with which to do better optimization than it usually does.
So for 'non-touched' code, you are not really worse off than if you compiled the code without PGO at all, at least if you use "-fprofile-partial-training" for GCC as it otherwise optimizes such code for size rather than performance.
- Likes 1
Comment
-
There's also FDO (feedback driven optimizations), which is similar, but slightly different. I think FDO makes gathering profiling data easier, but I don't remember how exactly. I think it allows running programs normally and collects profile data transparently. Anyway, there are tools that make it possible to combine profiles from different runs, so in theory a public database could be created that user's could upload profiles to, which then get merged together and then made available for everyone to use without everyone redoing the profiling themselves.
Originally posted by GrinchIt's not as if it is making 'non-touched' code slower, it just doesn't have the runtime data for it with which to do better optimization than it usually does.
Originally posted by PuckPoltergeistSo building gcc with pgo is speeding up applications build with this gcc? This doesn't make sense. Enabling pgo should (must) not impact binaries build with this version of gcc.Last edited by binarybanana; 01 September 2021, 03:37 PM.
Comment
Comment