-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT #103
Comments
I did some quick benchmarks with PGO. Test environment
Benchmark setupFor the simple benchmark purposes I use For all builds, I disabled ResultsI got the following results:
Just for reference,
At least according to the simple benchmark above, PGO has a measurable positive effect on |
Those results look very promising! I'm curious though, is there a standard way to deploy PGO-optimized binaries ? e.g. suppose we had a representative invocation we can use for the instrumentation / profiling process, it seems like it would be hard to deploy this in a portable way (i.e. in a way that users could just |
Good question! As far as I know, there is no standard way to deploy PGO-optimized binaries in the Rust ecosystem. Usually, building a program with PGO is done via project-specific build scripts (e.g. Rustc project uses PGO in this way). So if you can prebuild binary with PGO - you do all PGO-related stuff in your CI setup, and the end-user doesn't care about building with PGO alone. If you want to give a user an easy way to build a program with PGO with |
Gotcha. I'll try and keep this in mind next time I do benchmarking for frawk. I'm not seeing a good way to get build.rs to work without requiring users to also install Either way; this seems super useful. Thanks again for the report! |
There is a way to implement PGO optimization without
You are welcome! |
|
Hi!
Recently I did many Profile-Guided Optimization (PGO) benchmarks on multiple projects (including interpreters and compilers like Rustc, Clang, GCC, CPython, and many others) - the results are available here. So that's why I think it's worth trying to apply PGO to frawk.
I can suggest the following things to do:
Here are some examples of how PGO is already integrated into other projects' build scripts:
configure
scriptAfter PGO, I can suggest evaluating LLVM BOLT as an additional optimization step after PGO.
For the Rust projects, I recommend starting with cargo-pgo for doing PGO optimizations.
The text was updated successfully, but these errors were encountered: