Profile-Guided Optimization (PGO) benchmark report #977
zamazan4ik
started this conversation in
Ideas
Replies: 1 comment
-
Thanks for sharing this @zamazan4ik ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
As I have done many times before, I decided to test the Profile-Guided Optimization (PGO) technique to optimize the library performance. For reference, results for other projects are available at https://github.com/zamazan4ik/awesome-pgo . Since PGO helped a lot for many other libraries, I decided to apply it on
vrl
to see if the performance win (or lose) can be achieved. Here are my benchmark results.Test environment
vrl
version:main
branch on commit16889935bf08268547dd494054dc906705a1dfc7
Benchmark
For benchmark purposes, I use built-in into the project benchmarks. For PGO optimization I use cargo-pgo tool. Release bench results I got with
taskset -c 0 cargo bench --workspace --all-features
command. The PGO training phase is done withtaskset -c 0 cargo pgo bench -- --workspace --all-features
, PGO optimization phase - withtaskset -c 0 cargo pgo optimize bench -- --workspace --all-features
.taskset -c 0
is used for reducing the OS scheduler's influence on the results. 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 the libraries' performance in many cases.
Further steps
I understand that the steps above can be time-consuming and hard to implement in practice. At the very least, the library's users can find this performance report and decide to enable PGO for their applications if they care about
vrl
performance in their workloads. Maybe a small note somewhere in the documentation will be enough to raise awareness about this work.Thank you.
Beta Was this translation helpful? Give feedback.
All reactions