Go 1.20, a planned upgrade to the Google-developed open source language, has just reached a release candidate stage. Profile-guided optimization (PGO) for the compiler is being previewed in the new version.
The Go 1.20 release candidate, announced on December 7, is available for download from go.dev. Go 1.20 is anticipated to go into production in February 2023. With Go 1.20, the compiler toolchain can carry out an application- and workload-specific optimizations based on runtime profile data thanks to preview support for PGO. The runtime/pprof or net/http/pprof packages can be used to collect pprof CPU profiles, which are currently supported by the compiler.
A preview feature in Go 1.20 called “profile-guided optimization” enables the compiler to carry out application- and workload-specific optimizations based on run-time profile data.
Read More: Golang previews profile-guided optimization