flâneur — a map of the web's best reading

Profile-guided optimization - The Go Programming Language

go.dev · 2,500 words · saved by 1 readers

Starting in Go 1.20, the Go compiler supports profile-guided optimization (PGO) to further optimize builds. Table of Contents: Overview Collecting profiles Building with PGO Notes Frequently Asked Questions Appendix: alternative profile sources Profile-guided optimization (PGO), also known as feedback-directed optimization (FDO), is a compiler optimization technique that feeds information (a profile) from representative runs of the application back into to the compiler for the next build of the application, which uses that information to make more informed optimization decisions. For example, the compiler may decide to more aggressively inline functions which the profile indicates are called frequently. In Go, the compiler uses CPU pprof profiles as the input profile, such as from runtime/pprof or net/http/pprof. As of Go 1.22, benchmarks for a representative set of Go programs show that building with PGO improves performance by around 2-14%. We expect performance gains to generally in

Profile-guided optimization Starting in Go 1.20, the Go compiler supports profile-guided optimization (PGO) to further optimize builds. Table of Contents: Overview Collecting profiles Building with PGO Notes Frequently Asked Questions Appendix: alternative profile sources Overview Profile-guided optimization (PGO), also known as feedback-directed optimization (FDO), is a compiler optimization technique that feeds information (a profile) from representative runs of the application back into to the compiler for the next build of the application, which uses that information to make more informed

Explore this link on the map →

related reading