Go 1.8 Goes Faster
Written by Mike James   
Friday, 17 February 2017

Google's Go is still going and its latest destination is the new 1.8. After more than seven years of existence thing have settled down and the new version is as much about consolidation as anything else.

goblack

As Go is intended to be a systems programming language, efficiency has to be high up on the list of desirable properties. The new version has a much improved compiler backend:

"The compiler back end introduced in Go 1.7 for 64-bit x86 is now used on all architectures, and those architectures should see significant performance improvements. For instance, the CPU time required by our benchmark programs was reduced by 20-30% on 32-bit ARM systems." 

Of course, the improvements for 64-bit x86 were mostly seen in version 1.6, but the team is promising further gains in the future.

Garbage collection is also critical for a systems language, so much so that some would argue think that automatic garbage collection has no part to play in a systems language. The problem is that you can be running some critical system task and suddenly garbage collection can kick in and the entire system is down for an unacceptable period. In Go 1.8 the garbage collection pauses have been much reduced from less than 100 microseconds in 1.7 down to 10 microseconds in 1.8.

Other improvements are fairly minor:

The HTTP server adds support for HTTP/2 Push, allowing servers to preemptively send responses to a client. This is useful for minimizing network latency by eliminating roundtrips. The HTTP server also adds support for graceful shutdown, allowing servers to minimize downtime by shutting down only after serving all requests that are in flight.

The sort package has been improved:

It's now much simpler to sort slices: added Slice function in the sort package. For example, to sort a slice of structs by their Name field:

sort.Slice(s, func(i, j int) bool { return s[i].Name < s[j].Name
})

Go hasn't changed much since version 1 and the new version is backward compatible and this is a strong point.

Work has started on Go 1.9, but don't expect anything revolutionary. The big issues in Go are Generics, exceptions and assertions - the issue is it doesn't have them. Some, probably the majority, think that these things are not only not necessary, but would actually make the language worse. Programmers from other languages aren't quite so sure and there are still attempts to invent ways of adding these things in ways that are acceptable to Go programmers. Of the three it is the lack of generics which causes most turbulence and discussion. 

Go seems to be undergoing a surge in popularity at the moment. It is Tiobe's language of the year 2016 and still as popular in 2017. One possible suggested reason is that Docker is a Go project and this is proof enough that it is a language that can be used for real things.

goicon1

More Information

Go 1.8 is released

 

Related Articles

Go Language Of The Year With Dart Catching Up 

Go Turns Seven With Lots Of Attention 

Go 1.7 Goes Faster and in More Directions

Go 1.6 Released

Go 1.5 In Beta

Go 1.4 gets Android support 

Go 1.3 Released

A Programmer's Guide To Go

Why invent a new language? Go creator explains

Go Is Four

Go with Google - Yet Another Language!

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


GitHub Enterprise Server Adds Deployment Rollout Controls
11/03/2024

Version 3.12 of GitHub Enterprise Server, the self-hosted version of GitHub that organizations can install on their own servers, has been released with support for restricting deployment rollouts [ ... ]



Crazy Clocks
10/03/2024

It's that time again when the clocks change and  time is of the essence and I indulge my interest in crazy clocks. I am always surprised that there are still new ideas for how to display the time [ ... ]


More News

 

raspberry pi books

 

Comments




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

Last Updated ( Tuesday, 29 August 2017 )