Profile-Guided Optimization (PGO) benchmark results #1
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
-
(initially was posted as a Reddit comment)
Hi!
I decided to test Profile-Guided Optimization (PGO) effects on the library performance (as I already did for many other applications - check https://github.com/zamazan4ik/awesome-pgo ). Unfortunately, in the https://github.com/lovasoa/serde-sqlite-jsonb repo both Issues and Discussions are disabled so I leave my results here. Such information can be valuable for users who want to extract additional performance from the library.
Test environment
master
branch on commit6088de7023a4cd1b8c72eca3459dd4cfd5ae8d50
Benchmark
For benchmark purposes, I use built-in benchmarks. Release bench is done with
taskset -c 0 cargo bench
, PGO instrumentation - withtaskset -c 0 cargo pgo bench
, PGO optimization - withtaskset -c 0 cargo pgo optimize bench
. cargo-pgo is used for performing all PGO-related routines. As a PGO training workload, the same benchmark was used.taskset
is used for reducing OS scheduler noise.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.
Maybe putting some note about PGO effects on the library performance somewhere in the README is worth it. Also, it will be nice if you open Issues and/or Discussion in the repo ;)
Moved this content from Reddit to repo to discuss it further here (just in case).
Beta Was this translation helpful? Give feedback.
All reactions