3 ms·
"PGO in C++ is in practice only rarely used, due to the difficulty of setting it up and incorporating it into the build cycle." This is pretty much false these
by DannyBee 10y ago
"PGO in C++ is in practice only rarely used, due to the difficulty of setting it up and incorporating it into the build cycle."
This is pretty much false these days.
Most folks who care about it use it.
You were right 10 years ago.
At this point, there are enough companies where 10% perf is tens or hundreds of millions of dollars, and so the world changed.
"As a consequence compiler writers rarely focus on it and C++ is designed on the assumption that optimisation is always done statically."
Also false as a consequence of the above :)
"Java is designed on the assumption that JITC is available and JVM designers focus more on PGO as a result.
"
But they have less time to perform any of the expensive opts pgo enables. so ...
- mike_hearn 10y agoI'm sure Google does these days, though when I was there PGO wasn't widely used. But even Chrome only started using PGO late last year (15% speed boost!), and Chrome is one of the most intensively optimised apps out there. So I think it's fair to say that most C++ apps built by mere mortal companies probably still don't use it. But I'd be keen to see data showing I'm wrong. Perhaps MSVC++ or LLVM leaves some trace of PGO behind in the binary, and a Windows/Mac machine with lots of apps installed could be scanned to get an idea (for desktop usage at least).
- chubot 10y agoI just saw that Python's Makefile has support for PGO builds: https://github.com/python/cpython/blob/master/Makefile.pre.in#L479 https://github.com/python/cpython/blob/master/Makefile.pre.i... Not sure when it was added, but Python 2.7 has it. It's not clear to me how to tell if say my Ubuntu binary is built with PGO, but it's something I'm looking into.
- DannyBee 10y ago"I'm sure Google does these days, though when I was there PGO wasn't widely used". Yes it was. Maybe you didn't know, but it was. "and Chrome is one of the most intensively optimised apps out there. " This isn't really true actually. So if that's your counter-argument, ... "So I think it's fair to say that most C++ apps built by mere mortal companies probably still don't use it" No, it isn't :) Really. So far you've cited one example of someone being late to the party. " But I'd be keen to see data showing I'm wrong." What form do you want it to take?