Profile-guided optimization - The Go Programming Language
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
- Profiling Go programs with pprofjvns.ca
- From hand-tuned Go to self-optimizing code: Building BitsEvolve | Datadogdatadoghq.com
- Frequently Asked Questions (FAQ) - The Go Programming Languagego.dev
- Go at Google: Language Design in the Service of Software Engineering - The Go Programming Languagego.dev
- Diagnostics - The Go Programming Languagego.dev
- Four Days of Go – Evan Millerevanmiller.org
- Peter Bourgon · Go for Industrial Programmingpeter.bourgon.org
- abseil / Performance Hintsabseil.io
- Using go fix to modernize Go code - The Go Programming Languagego.dev
- Making a Go program run 1.7x faster with a one character change • Harry Marrhmarr.com
- A Guide to the Go Garbage Collector - The Go Programming Languagego.dev
- Paul Buchheit: Optimizing everything: some details matter a lot, most don'tpaulbuchheit.blogspot.com