Go 1.8 is not yet released. These are work-in-progress release notes. Go 1.8 is expected to be released in February 2017.
The latest Go release, version 1.8, arrives six months after Go 1.7. Most of its changes are in the implementation of the toolchain, runtime, and libraries. There is one minor change to the language specification. As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before.
The release adds support for 32-bit MIPS, updates the compiler back end to generate more efficient code, produces smaller binaries (TODO: link/numbers), reduces GC pauses by eliminating stop-the-world stack rescanning, adds HTTP/2 Push support, adds HTTP graceful shutdown, and simplifies sorting slices.
When explicitly converting structs, tags are now ignored for structural type identity. See change 24190 for details.
Go now supports 32-bit MIPS on Linux for both big-endian
(linux/mips
) and little-endian machines
(linux/mipsle
).
Go now requires DragonFly BSD 4.4.4 or later.
The Plan 9 port's networking support is now much more complete and matches the behavior of Unix and Windows with respect to deadlines and cancelation.
There are some instabilities on FreeBSD that are known but not understood. These can lead to program crashes in rare cases. See issue 15658 and issue 16396. Any help in solving these FreeBSD-specific issues would be appreciated.
For 64-bit x86 systems, the following instructions have been added:
VBROADCASTSD
,
BROADCASTSS
,
MOVDDUP
,
MOVSHDUP
,
MOVSLDUP
,
VMOVDDUP
,
VMOVSHDUP
,
and VMOVSLDUP
.
For 64-bit PPC systems, the common vector scalar instructions have been added. See change 30510.
The yacc
(previously available via
“go
tool
yacc
”)
has been removed. As of Go 1.7 it was no longer used by the Go compiler.
It has moved to the “tools” repo and is and is available via
go get golang.org/x/tools/cmd/goyacc
.
Go 1.7 introduced a new compiler back end for 64-bit x86 systems. In Go 1.8, that back end has been developed further and is now used for all architectures.
The new back end, based on SSA, generates more compact, more efficient code and provides a better platform for optimizations such as bounds check elimination. The new back end reduces the CPU time required by our benchmark programs by N-M%. TODO: ARM binary size & perf numbers.
The temporary -ssa=0
flag introduced in Go 1.7 to disable
the new backend has been removed in Go 1.8.
The compiler and linker have been optimized and run faster in this release than in Go 1.7, although they are still slower than we would like and will continue to be optimized in future releases.
Due to changes across the compiler toolchain and standard library, binaries built with this release should typically be smaller than binaries built with Go 1.7, sometimes by as much as TODO numbers.
TODO
TODO
The go
command's basic operation
is unchanged, but there are a number of changes worth noting.
A new “go
bug
” command helps users file bug reports.
As always, the changes are so general and varied that precise statements about performance are difficult to make. Most programs should run a bit faster, due to speedups in the garbage collector and optimizations in the core library.
There have been significant optimizations bringing more than 10% improvements
to implementations in the
TODO TODO:
foo
,
bar
,
and
quux
packages.
Garbage collection pauses should be significantly shorter than they were in Go 1.7, often as low as 10 microseconds and usually under 100 microseconds. See the document on eliminating stop-the-world stack re-scanning for details. More work remains for Go 1.9.
defer
calls are now about twice as fast.
Calls from Go into C are now TODO% faster.
Many examples have been added to the documentation across many packages.
The sort package
now includes a convenience function
sort.Slice
to sort a
slice given a less function.
In many cases this means that writing a new sorter type is not
necessary.
Also new are
sort.SliceStable
and
sort.SliceIsSorted
.
The net/http package now includes a
mechanism to
send HTTP/2 server pushes from a
Handler
.
Similar to the existing Flusher
and Hijacker
interfaces, an HTTP/2
ResponseWriter
now implements the new
Pusher
interface.
As always, there are various minor changes and updates to the library, made with the Go 1 promise of compatibility in mind.