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


Ibis 8 Adds Streaming
05/03/2024

Ibis 8.0 has been released with stream processing backends. The new release includes Apache Flink as a streaming backend, and RisingWave, a streaming database backend. There's also a new batch backend [ ... ]



AWS Adds Support For Llama2 And Mistral To SageMaker Canvas
12/03/2024

As part of its effort to enable its customers to use generative AI for tasks such as content generation and summarization, Amazon has added these state of the art LLMs to SageMaker Canvas.


More News

raspberry pi books

 

Comments




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

Last Updated ( Tuesday, 07 February 2023 )