← All releases

go1.9.0

Major

August 24, 2017

Go 1.9 adds type aliases and defines float op fusion rules to the language, plus transparent monotonic time tracking, a new sync.Map, math/bits package, parallel per-package compilation, and better test-helper support—while staying source-compatible per the Go 1 promise.

highlights
  • Language: added type aliases (type T1 = T2) for gradual code repair when moving types between packages

  • Language: spec now defines when compilers may fuse floating point ops (e.g. FMA); use float64(x*y) + z to force rounding

  • time package now tracks monotonic time transparently in Time values, making duration comparisons safe across wall-clock adjustments

  • New math/bits package with compiler-recognized intrinsics for bit manipulation

  • New sync.Map: a concurrent map with amortized O(1) loads, stores, and deletes

  • Compiler now parallelizes compilation of functions within a package (disable via GO19CONCURRENTCOMPILATION=0)

  • testing gained (*T).Helper and (*B).Helper to mark helper functions and improve reported line numbers

  • runtime/pprof supports profiler labels, and profiles now embed symbol info so they're viewable without the original binary

  • ./... no longer matches vendor directories by default; use ./vendor/... explicitly

  • ppc64/ppc64le now both require POWER8; OpenBSD 6.0+ and (soon) FreeBSD 10.3+ required, dropping older OS support

  • runtime.Callers-based stack walking can miss inlined frames; use runtime.CallersFrames or runtime.Caller instead

  • GC-triggering functions (runtime.GC, debug.SetGCPercent, debug.FreeOSMemory) now trigger concurrent rather than stop-the-world collection