Google Go 1.8 steps up compilation, garbage collection

Posted on 17-02-2017 , by: admin , in , 0 Comments

Go 1.8, the latest version of Google’s popular open source language, is now available.

Officially released Thursday, version 1.8 focuses on compilation, garbage collection, and HTTP support. “The compiler back end introduced in Go 1.7 [last August] for 64-bit x86 is now used on all architectures, and those architectures should see significant performance improvements,” said Chris Broadfoot on behalf of the Go team. “For instance, the CPU time required by our benchmark programs was reduced by 20-30 percent on 32-bit ARM systems.”

Garbage collection, meanwhile, promises to be significantly shorter in Go 1.8 — usually less than 100 milliseconds and possibly as little as 10 milliseconds, Broadfoot said — standard library optimizations improve performance as well. HTTP/2 Push support lets servers preemptively send responses to a client, which minimizes network latency by eliminating round trips, and graceful shutdown of the HTTP server minimizes downtime by shutting down only after serving all requests in flight.

The Slice function in Go 1.8’s sort package makes it easier to sort slices, such as sorting a slice of structs in their Name field. The upgrade also increases support for contexts in more parts of the standard library, providing a mechanism for cancellation and timeout. Available in the Go 1.7 standard library, it has been expanded for usage in the database/sql and net packages and Server.shutdown in the net/http package.