Although the latest release of Go does not include any major changes at the language level, it provides a number of improvements to the toolchain, the Go runtime, and the standard library.
One of the major improvements brought by Go 1.10 is caching of build results along with better detection of out-of-date packages. In particular, Go does not rely anymore on file modification times in order to decide when a file shall be recompiled. Instead, the tooling bases this decision on file content, build flags, and metadata stored in the compiled packages. This makes the -a
flag, which was used to force a rebuild, not necessary anymore. Caching of built packages aims to further improve build times, especially when you go back and forth between sets of build flags or source-code versions or branches.
Similarly, the go test
command now caches test results for successful tests. Whenever go test
detects that the test executable and the command line arguments match with those used in a previous test run, it will just output the cached test result.
The Go 1.10 runtime has learned to play safely with Linux namespaces by allowing calls to LockOSThread and UnlockOSThread to nest. This means goroutines can now be used with containers without any of the hindrances that affected previous versions.
Additionally, the Go runtime improves garbage collection allocation latency by using a smaller fraction of the CPU for longer spans, which does not affect overall CPU consumption.
As a final note, the Go performance should also benefit from improvements to the garbage collector, optimizations in the standard library, and better code generation.
As expected, while the major release number does not change, Go 1.10 maintains compatibility with the majority of programs that could be compiled with previous 1.x versions, according to Golang team.
The number of changes that went into Go 1.10 is too long to list within this news item, and so interested readers are referred to the official release notes for full details.