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.


Mbed Is Dead - Thanks Arm

Fifteen years ago, ARM decided that it would be good to "help" IoT projects by creating a common OS and development environment for ARM-based development boards and brought us Mbed. Now we have until  [ ... ]

MySQL 9 Adds Support For JavaScript Stored Procedures

Oracle has announced that support for JavaScript functions and stored procedures has been added to the MySQL database server. The enhancements were added to MySQL 9, an 'innovation release', whic [ ... ]

More News

kotlin book



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

Last Updated ( Tuesday, 07 February 2023 )