protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.09k stars 15.43k forks source link

Evaluate Profile-Guided Optimization (PGO) #13248

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.

Since PGO showed measurable improvements in compiler-like loads (Clang, Clangd, clang-format, GCC, Rustc, etc.) I think it could be useful to check PGO on Protobuf compiler (protoc) as well.

We need to perform PGO benchmarks on protoc. And if it shows improvements - add a note about possible improvements protoc performance with PGO. Providing an easier way (e.g. a build option) to build scripts with PGO can be useful for the end-users too. Improving protoc performance can help with faster Protobuf compilation time (and that's nice to have e.g. on CI).

fowles commented 1 year ago

If you find reasonable improvements and the support burden is low we would be willing to entertain patches to fix this.