Go 1.20 Adds Profile-Guided Optimization
Written by Kay Ewbank   
Tuesday, 07 February 2023

Go has been updated with a preview of profile-guided optimization (PGO) which means the compiler can perform specific optimizations for applications and workloads based on run-time profile information.

Since its initial development by Google, Go has matured as an open source project maintained by a team at Google alongside many contributors from the open source community. Go was designed as a systems programming language, and has also been used in high profile commercial successes such as Docker.


The Go team says the profile-guided optimization speeds up typical applications by around three to four percent when a profile is provided to Go Build, and the team expects future releases to benefit even more from PGO.

PGO is also known as feedback-directed optimization (FDO). Information from representative runs of the compiler are fed back into the compiler, which then uses that information to make more informed optimization decisions for the next run of the compiler. For example, the compiler may decide to more aggressively inline functions which the profile indicates are called frequently.

Go 1.20 also has some language changes and a number of improvements to tooling and the library.  You can now use ordinary comparable types to satisfy the predeclared comparable constraint, and Go's type conversion rules have been extended so you can directly convert from a slice to an array. Slice manipulation has also been extended with the addition of the functions SliceData, String, and StringData to package unsafe.

Go 1.20  is available for download now.


More Information

Go Download Page

GoLang Org Webpage

Related Articles

Why Is Go Good?

Go Survey 2021

Go 1.18 Released With Generics And Fuzzing

Insights Into Where Go Is Going

A Programmer's Guide To Go

A Programmer's Guide To Go Part 2 - Objects And Interfaces

A Programmer's Guide To Go Part 3 - Goroutines And Concurrency


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Jakarta vs Spring - The War Goes On

In a very interesting webinar streamed live as part of the recent JConference, Antoine Sabot-Durand talked about "hostility" between J2EE/Jakarta and Spring and the differences between them from  [ ... ]

The Turing Test Is Past

... and dead and gone. This long time talking point really isn't relevant since the advent of LLMs like GTP. We may be worried about AI taking our coding jobs, but let us not forget that this is the t [ ... ]

More News





or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 07 February 2023 )