Evaluate using Profile-Guided Optimization (PGO) in the future #4
zamazan4ik
started this conversation in
Ideas
Replies: 1 comment
-
|
PGO is being added! Currently only for MacOS and Windows, will enable for the rest later :) |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
It's not an actual problem - just a possible improvement idea for the project. I created the Issue since Discussions are disabled for the repo.
I decided to test the Profile-Guided Optimization (PGO) technique to optimize Fennec's performance. For reference, results for other projects are available at https://github.com/zamazan4ik/awesome-pgo . Since PGO helped with many projects (including compilers, code formatters, language servers, linters, etc.), I decided to apply it to Fennec to see if the performance win (or loss) can be achieved. Here are my benchmark results.
Test environment
fennecversion:mainbranch on commit636ebde54be22d52413cef7bfcb05e59127fb31eBenchmark
For benchmark purposes, I use
fennec lintcommand for linting PHP-CS-Fixer. For PGO optimization I use cargo-pgo tool. The PGO training workload is the same -fennec linton thePHP-CS-Fixerproject with the PGO instrumentedfennec(is done withcargo pgo build).taskset -c 0is used to reduce 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) and multiple times withhyperfine.Results
I got the following results.
where:
fennec_release: the default Release profilefennec_optimized: the default Release profile + PGO optimizationAccording to the results, we see measurable performance improvement.
Further steps
I can suggest the following action points:
awesome-pgoresults, such tools also can be performance-improved with PGOAlso, Post-Link Optimization (PLO) can be tested after PGO. It can be done by applying tools like LLVM BOLT. However, it's a much less mature optimization technique compared to PGO.
Since the project is in its early stages, for now, I recommend you don't spend much time on integrating PGO into the project pipelines. But when most of the features are implemented, then PGO will be a good addition for the project
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions