Google has released the latest version of its Go programming language, and it’s mostly about speed.
"We have made optimizations in the compiler and linker, garbage collector, goroutine scheduler, map implementation, and parts of the standard library," said Andrew Gerrand in a blog post. "It is likely that your Go code will run noticeably faster when built with Go 1.1."
Go is a general-purpose language similar to C or C++ but with modern improvements, an easier language, and built-in library for writing server programs (Google uses it for its own servers.)
Google’s programming language is often noted as being capable but not having the same level of performance as some others. The latest update, however, could help in closing the gap. Google claims typical improvements relative to Go 1.0 seem to be about 30%-40%, sometimes much more, but occasionally less or even non-existent.
There are too many small performance-driven tweaks through the tools and libraries to list them all here, but the following major changes are worth noting:
The gc compilers generate better code in many cases, most noticeably for floating point on the 32-bit Intel architecture.
The gc compilers do more in-lining, including for some operations in the run-time such as append and interface conversions.
There is a new implementation of Go maps with a significant reduction in memory footprint and CPU time.
The garbage collector has been made more parallel, which can reduce latencies for programs running on multiple CPUs.
The garbage collector is also more precise, which costs a small amount of CPU time but can reduce the size of the heap significantly, especially on 32-bit architectures.
Due to tighter coupling of the run-time and network libraries, fewer context switches are required on network
Launching a new programming language is a difficult task but Google is doing an admirable job and avoiding the criticisms the company received about Dart, the company’s language designed to improve on the JavaScript language used to power Web sites and Web apps.
On the TIOBE Index, Go has surged to 10th in the rankings from 55th in July last year. Google began developing Go in 2007 and unveiled it publicly in 2009.
Go 1.1 is backward compatible, so all existing code should run when built with the latest tools. "We recommend all Go users upgrade to the new release," Gerrand said.
Are you impressed with the Go programming language? Share your thoughts in the comments.