mozilla / sccache

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
Apache License 2.0
5.74k stars 542 forks source link

PGO optimization and sccache #1811

Open zamazan4ik opened 1 year ago

zamazan4ik commented 1 year ago

Hi!

Did anyone try to apply Profile-Guided Optimization (PGO) to sccache itself? It could optimize the performance "automatically" in CPU-intensive parts of the application. Since it's written in Rust it will be pretty easy to test with cargo-pgo.

luser commented 1 year ago

I don't believe so, but I also would not expect much gain here. There's not much CPU-intensive work in the entire application, last I knew, and most of what there is is just calculating hashes, which is already a highly-optimized operation. 99% of what sccache does is sitting around waiting for I/O (reading/writing cache entries) and waiting for compilers to finish.