Go 1.20 Released With Preview PGO Support, CPU Architecture Feature Build Flags

Written by Michael Larabel in Programming on 1 February 2023 at 04:37 PM EST. 1 Comment
PROGRAMMING
Google has released a new version of the Go programming language that with today's v1.20 release come a number of notable additions as well as gutting out support for older versions of Microsoft Windows and Apple macOS. Two features alone have me excited about Go 1.20: initial work on CPU architecture feature build flags like for x86_64 micro-architecture feature level handling and initial support for Profile Guided Optimizations (PGO) builds.

In addition to some subtle changes and additions to the Go programming language, some of the other platform and tooling work with Go 1.20 includes:

- Go 1.20 is the last release supporting Microsoft Windows 7 / 8 / Server 200 8 / Server 2012. With Go 1.21, Windows 10 or Windows Server 2016 is the new minimum baseline.

- Go 1.20 is also dropping support for macOS 10.13 and 10.14 series.

- Experimental support for FreeBSD on RISC-V is introduced.

- The $GOROOT/pkg directory no longer stores pre-compiled package archives for the standard archive in order to reduce the size of the Go distribution.

- The go command now defines architecture feature build flags, like amd64.V2, to allow selecting a package implementation file based on the presence or absence of particular CPU architecture features. This is great news for the x86_64 micro-architecture feature level work.

- The go build and go install and other build-related commands now supports a "-cover" flag for enabling a build with code coverage instrumentation.

- Memory overhead reduction and CPU performance improvements by up to 2% thanks to work on the garbage collector.

- Preview support for Profile Guided Optimizations (PGO).

- On Linux the linker now selects the dynamic interpreter for glibc or musl at link-time.

- A new crypto/ecdh package to provide explicit support for Elliptic Curve Diffie-Hellman key exchanges over NIST curves and Curve25519.

Golang logo


Downloads and more details on the Go 1.20 release 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