← All releases

go1.8.0

Major

February 16, 2017

Go 1.8 ships a new SSA compiler back end for all architectures (toolchain ~15% faster), dramatically shorter GC pauses, and notable stdlib additions like HTTP/2 server push, graceful HTTP shutdown, wider context.Context support, and sort.Slice. Two small, low-impact language spec changes are included; upgrade is low-risk and worthwhile mainly for performance.

highlights
  • New SSA-based compiler back end now used for all architectures (not just amd64); toolchain is ~15% faster overall, with 20-30% faster generated code on 32-bit ARM.

  • GC pause times cut dramatically, often under 100 microseconds (sometimes ~10µs), by eliminating stop-the-world stack rescanning.

  • Language change: explicit struct-to-struct conversions now ignore field tags, so structs differing only in tags can be converted.

  • Language spec lowers the required floating-point constant exponent range to 16 bits (gc and gccgo still support 32-bit, so no practical change).

  • Added 32-bit MIPS support on Linux (linux/mips, linux/mipsle); this is the last release supporting Linux on ARMv5E/ARMv6.

  • net/http gains HTTP/2 server push via the new Pusher interface.

  • net/http.Server adds graceful shutdown (Server.Shutdown) and abrupt shutdown (Server.Close).

  • Expanded context.Context support across the stdlib: new *Context methods in database/sql, context-aware net.Resolver, and Server.Shutdown.

  • New sort.Slice, SliceStable, and SliceIsSorted let you sort with a less function instead of writing a sort.Interface type.

  • Added mutex contention profiling (go test -mutexprofile, runtime.SetMutexProfileFraction); currently only covers sync.Mutex, not RWMutex.

  • GOPATH now has a default value ($HOME/go or %USERPROFILE%/go) when unset, so it no longer must be set explicitly.

  • New early-stage plugin build mode and plugin package for loading Go plugins at runtime (Linux only).