Description
Location
Don't know the right place for this information - needs to be clarified.
Summary
The official Rustc distribution is not the only Rustc binary version, which is used by Rust users. E.g. there are provided by multiple OS packages (like Fedora rust
package) or even built in-house Rustc version (due to some not-so-rare specific security requirements).
According to the great @Kobzol work, PGO and LLVM BOLT helps a lot with optimizing Rustc performance. We need to document somewhere the PGO and BOLT benefits for rustc
performance and a guide - how these optimizations could be applied to rustc
if a user/maintainer wants to build rustc
on their own.
Here are the examples of PGO mentions in the documentation for other projects:
- GCC: Official docs, section "Building with profile feedback" (even AutoFDO build is supported)
- Clang: https://llvm.org/docs/HowToBuildWithPGO.html
- ClickHouse: https://clickhouse.com/docs/en/operations/optimizing-performance/profile-guided-optimization
- Databend: https://databend.rs/doc/contributing/pgo
- Vector: https://vector.dev/docs/administration/tuning/pgo/
- Nebula: https://docs.nebula-graph.io/3.5.0/8.service-tuning/enable_autofdo_for_nebulagraph/
I didn't find a place where to put this information, so we can discuss it here. If there is no dedicated place and we don't want to create it - maybe a README would be a good place (since it already has build instructions)?