Evaluate Profile-Guided Optimization (PGO) usage #1294
zamazan4ik
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Recently I checked optimizations like Profile-Guided Optimization (PGO) and Post-Link Optimizations (PLO) improvements on multiple projects. The results are available here. According to the tests, all these optimizations can achieve better performance in many cases for many applications. I think trying to enable them for the project could be a good idea since the project cares about performance (according to the README file). I already did some preliminary benchmarks and want to share my results here. Hopefully, they will be helpful.
Test environment
main
branch on commit59040a8686fbaa0390d6f0e8903774dab75fc320
Benchmark
For benchmark purposes, I use built-in benchmarks. Release bench is done with
cargo bench
, PGO instrumentation - withcargo pgo bench
, PGO optimization - withcargo pgo optimize bench
. cargo-pgo is used for performing all PGO-related routines. As a PGO training workload, the same benchmark was used.All tests are done on the same machine, done multiple times (results are the same), with the same background "noise" (as much as I can guarantee of course) - the results are reproducible at least on my machine.
Results
Here are the results:
At least to the simple benchmarks above, PGO measurably improves the library's performance. However, I understand that these benchmarks can be too synthetic.
Further steps
I can suggest the following action points:
Here are some examples of how PGO optimization is integrated into other projects:
configure
scriptPlease, do not treat the discussion like a bug or smth like that. It's just a benchmark report with possible improvement ideas for the project.
Beta Was this translation helpful? Give feedback.
All reactions