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.

goicon2

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.

goicon2

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.

Banner


Angular and Wiz To Merge
27/03/2024

Two web development frameworks used at Google are merging. One, Angular is open source and widely known, while the other, Wiz, is an internal web framework developed and used by Google for some o [ ... ]



Run WebAssembly Components Inside Node.js With Jco
28/03/2024

Jco 1.0 has been just announced by the Bytecode Alliance.It's a native JavaScript WebAssembly toolchain and runtime that runs Wasm components inside Node.js. Why is that useful?


More News

raspberry pi books

 

Comments




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

Last Updated ( Tuesday, 07 February 2023 )