Profile-Guided Optimization (PGO) benchmark results #1041
zamazan4ik
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Do I understand correctly that some benchmarks are 500% faster with these optimizations? This is only useful when doing PGO on the actual application, right? We can't provide these optimizations with the library, or can we? I am not sure about the current state of our benchmark. I believe they can be improved a lot. Are you willing to do some work on our benchmarks? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
Recently I tested Profile-Guided Optimization (PGO) compiler optimization on different projects in different software domains - all the results are available in https://github.com/zamazan4ik/awesome-pgo . Since PGO shows measurable improvements in many cases, I decided to perform PGO benchmarks on
prost
. Here are my results.Test environment
master
branch on commit1fc736ef7840ad986e7f6e185c242489e97f3400
Benchmark
For benchmark purposes, I use built-in into the project benchmarks. For PGO optimization I use cargo-pgo tool. Release bench result I got with
cargo bench --workspace
command. PGO training phase is done withcargo pgo bench -- --workspace
, PGO optimization phase - withcargo pgo optimize bench -- --workspace
.All measurements are done on the same machine, with the same background "noise" (as much as I can guarantee).
Results
I got the following results:
According to the results, PGO measurably improves prost performance in many cases.
Further steps
I can suggest the following action points:
Testing Post-Link Optimization techniques (like LLVM BOLT) would be interesting too (Clang and Rustc already use BOLT as an addition to PGO) but I recommend starting from the usual PGO.
I would be happy to answer your questions about PGO.
Beta Was this translation helpful? Give feedback.
All reactions