Go 1.8

A quick fly through Go history

Tim Penhey

@howbazaar

History

  • Created at Google in 2007
  • Open source
  • Compiled, statically typed language
  • Garbage collected

Other points of interest

  • No inheritence
  • No exceptions

Releases

  • 1.8 February 2017
  • 1.7 August 2016
  • 1.6 February 2016
  • 1.5 August 2015
  • 1.4 December 2014
  • 1.3 June 2014
  • 1.2 December 2013
  • 1.1 May 2013
  • 1.0 March 2012

I started with Go here

Go 1.0

  • Driving motivation was to provide stability for users
  • Code that compiles with Go 1 should, with few exceptions, continue to compile and run with future 1.x versions
  • Solid standard library
  • Capable of cross compiling, e.g. windows exe from linux

Go 1.1

  • Primary focus was performance
    • typical improvements about 30%-40%
  • Method values, bound functions
  • int and uint went from 32 to 64 bits on 64 bit architectures
  • Introduced the race detector
  • New packages: go/format, net/http/cookiejar, runtime/race

Go 1.2

  • Start of a shorter release cycle
  • Improvements to internal scheduler, thread handling, and stack size
  • Introduces coverage tool as part of 'go test'
  • Performance improvements on bzip, crypto/des, and json packages
  • New packages: encoding, image/color/palette

Go 1.3

  • Faster builds, better garbage collection
    • 50%-70% reduction in collector pause time
    • race detector about 40% faster
  • Added support for DragonFly BSD, Solaris, Plan 9, and Google's Native Client architecture (NaCl)
  • Changes map iteration order to be not specified
  • New packages: debug/plan9obj

Go 1.4

  • Most of the C code for the Go runtime (garbage collector, concurrency support, interface management, maps, slices, strings) translated to Go
  • Internal packages within the go package, stops packages being imported outside of the source tree
  • Added "custom" or "vanity" import path
    • e.g. github.com/rsc/pdf -> rsc.io/pdf
  • Added 'go generate' for code generation

Go 1.5

  • Compiler and runtime now entirely written in Go (with a little assembler)
  • Garbage collector is now concurrent, will run with other goroutines when possible
  • Go defaults to now use all the cores on the machine (used to be 1)
  • Internal packages now available for any package

Text

GC Pause (ms)

Go 1.6

  • Added support for linux/ppc64le, and experimental linux/mips64, linux/mips64le, android/386
  • Initial support for shared object libraries
  • Support added for vendoring external libraries
  • No new packages, but many big fixes

Text

Text

Go 1.7

  • Added support for macOS 10.12 Sierra, linux/s390x, and initial plan9/arm. Previous experimental 64-bit MIPS now fully supported
  • New code generation for 64-bit x86 systems means reduced CPU time 5%-35%
  • Compiler and linker optimisations
  • New packages: context, net/http/httptrace

Wall clock compile and link

Wall clock link time

Resulting binary size

Go 1.8

  • Most changes are in the implementation of the toolchain, runtime, and libraries
  • Struct assignment now ignores tags
  • EOL some older OSes, early OS X, ARMv5E ARMv6
  • The compiler backend introduced in 1.7 for 64-bit x86 now used for all architectures
  • Compiler and linker optimised, about 15% improvement
  • Default GOPATH, $HOME/go, %USERPROFILE%/go
  • Early support for plugins, only on linux for now

Wall clock compile and link

Text

Resources

That's a wrap

Any Questions?

Go 1.8

By Tim Penhey

Go 1.8

  • 1,001