viperproject / prusti-dev

A static verifier for Rust, based on the Viper verification infrastructure.
http://prusti.org
Other
1.56k stars 108 forks source link

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT #1454

Open zamazan4ik opened 1 year ago

zamazan4ik commented 1 year ago

Hi!

Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are here. LLVM-related results are here. According to the tests, PGO usually helps a lot with the compiler and compiler-like workloads (like static analysis). That's why I think trying to optimize Prusti with PGO can be a good idea.

I can suggest the following action points:

Maybe testing Post-Link Optimization techniques (like LLVM BOLT) would be interesting too but I recommend starting from the usual PGO.

For the Rust projects, I suggest PGO optimizing with cargo-pgo.

fpoli commented 1 year ago

Thanks for the suggestions! In almost all of our cases the bottleneck is the Viper tool that we have to use internally, not Rust code. So, I don't think that in practice the benefits of PGO would be visible. However, it might be worth trying it when evaluating the future Lithium backend, which is 100% Rust.