Evaluate using Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) #312
zamazan4ik
started this conversation in
Ideas
Replies: 1 comment
-
This is wonderful, thanks @zamazan4ik! I didn't know that the PGO results would be quite this impressive, I'll take a closer look during the week. |
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!
Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are available here. According to the tests, PGO can help with achieving better performance in many cases, including compilers and interpreters. Since Koto targets fast compilation (according to the documentation), I think trying to optimize Koto's tooling performance with PGO can be a good idea.
I already did some benchmarks and want to share my results.
Test environment
main
branch on commit1856abb432e44c95d40791815771bdc96e1ae34f
Benchmark
For benchmark purposes, I use these 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
.For all commands
taskset -c 0
is used for reducing the OS scheduler "noise". The measurements are done multiple times - the results are consistent across runs.Results
I got the following results:
According to the results, PGO measurably improves Koto's performance at least in the cases above.
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.
Here are some examples of how PGO optimization is integrated into other projects:
configure
scriptI would be happy to answer your questions about PGO and PLO.
Beta Was this translation helpful? Give feedback.
All reactions