Go 1.21 Enabling PGO For Faster Performance, Tuned Garbage Collector
The Go 1.21 release candidate is out today and it's interesting on the performance front plus a few language additions like min / max / clear functions as well as further enhancing its standard library.
Most interesting with the Go 1.21 series is now having its Profile Guided Optimization (PGO) support generally available. The go command will use it to enable a PGO build if there is a default.pgo file present in the main package's directory. Enabling PGO on a wide set of programs has shown to enhance performance by 2~7%. PGO is great when able to collect accurate/realistic traces/profiles of your application's workload and can be very beneficial to performance as shown in numerous compiler implementations.
The Go compiler itself has also been rebuilt with PGO enabled and is showing around 2~4% faster build performance for Go programs. The Go 1.21 release is also showing up to a 40% reduction in tail latency for some applications thanks to tuning the garbage collector.
Go 1.21's go tool also now supports backward and forward language compatibility, min / max / clear functions, improvements to type inference for generic functions, various library additions, and a new experimental port to WebAssembly WASI.
More details on the exciting Go 1.21 release candidate today via the project blog on go.dev.
Most interesting with the Go 1.21 series is now having its Profile Guided Optimization (PGO) support generally available. The go command will use it to enable a PGO build if there is a default.pgo file present in the main package's directory. Enabling PGO on a wide set of programs has shown to enhance performance by 2~7%. PGO is great when able to collect accurate/realistic traces/profiles of your application's workload and can be very beneficial to performance as shown in numerous compiler implementations.
The Go compiler itself has also been rebuilt with PGO enabled and is showing around 2~4% faster build performance for Go programs. The Go 1.21 release is also showing up to a 40% reduction in tail latency for some applications thanks to tuning the garbage collector.
Go 1.21's go tool also now supports backward and forward language compatibility, min / max / clear functions, improvements to type inference for generic functions, various library additions, and a new experimental port to WebAssembly WASI.
More details on the exciting Go 1.21 release candidate today via the project blog on go.dev.
8 Comments