News
Go 1.7 Features Compiler Speedups
- By David Ramel
- August 16, 2016
Google yesterday announced Go 1.7, the latest edition of its open source programming language, with compiler improvements among a host of new features.
"There are several significant changes in this release: a port for Linux on IBM z Systems (s390x), compiler improvements, the addition of the context package, and support for hierarchical tests and benchmarks," according to a blog post published yesterday.
Sometimes known as Golang, the language introduced in 2009 is described as "an open source programming language that makes it easy to build simple, reliable and efficient software."
Following a six-month release cadence, version 1.7 features improvements to both the compiler back end and front ends. A change in compiler back-end technology reportedly provides speed improvements of up to 35 percent on performance benchmarks, though it's only available for now on 64-bit x86 platforms ("amd64").
"A new compiler back end, based on static single-assignment form (SSA), has been under development for the past year," Google said. "By representing a program in SSA form, a compiler may perform advanced optimizations more easily. This new back end generates more compact, more efficient code that includes optimizations like bounds check elimination and common subexpression elimination."
On the front end, a new compacted format for exporting data and more efficient import declaration processing reportedly generate their own compile-time performance speedups, along with binary size reductions of up to 30 percent.
Other components should also register performance gains.
"Programs should run a bit faster due to speedups in the garbage collector and optimizations in the standard library," Google said. "Programs with many idle goroutines will experience much shorter garbage collection pauses than in Go 1.6."
The 1.7 release notes provide more detail, including the details of the single change made to the Go language itself.
"There is one tiny language change in this release," the release notes state. "The section on terminating statements clarifies that to determine whether a statement list ends in a terminating statement, the 'final non-empty statement' is considered the end, matching the existing behavior of the gc and gccgo compiler toolchains. In earlier releases the definition referred only to the 'final statement,' leaving the effect of trailing empty statements at the least unclear. The go/types package has been updated to match the gc and gccgo compiler toolchains in this respect. This change has no effect on the correctness of existing programs."
These and other improvements were reportedly enacted through the contributions of 170 people, with 140 of those being non-Google community developers. "These contributions ranged from changes to the compiler and linker, to the standard library, to documentation, and code reviews," Google said.
About the Author
David Ramel is an editor and writer at Converge 360.