Go 1.21 Promotes PGO To General Use, Boosts Most Programs 2~7% With PGO

Written by Michael Larabel in Programming on 8 August 2023 at 11:55 AM EDT. 27 Comments
PROGRAMMING
Go 1.21 is now available as the latest version of this popular programming language.

Back in February Go 1.20 brought preview support for Profile Guided Optimizations (PGO). With Go 1.21, the PGO support is now considered ready for general use. Go developers are finding most Go programs see between a 2% and 7% boost to performance by making use of the Profile Guided Optimization support. Go 1.21 is also seeing its build speed improve by up to 6% in large part due to the PGO'ing of the compiler itself.

Go 1.21 also has improved handling for Linux systems with transparent huge-pages (THP) for better performance, various other performance improvements, backwards compatibility improvements, improved type inference for Go code, and three new built-ins for the Go language itself. The new built-ins are min, max, and clear.

Go logo


More details on all of the changes to find with Go 1.21 via Go.dev.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week