Or at least the new things that I find exciting.
Talk: https://www.youtube.com/watch?v=jHbeRswUJYI&ab_channel=BostonGolang
Blog Post: https://ataylor.io/blog/go15
Some slides were taken from https://talks.golang.org/2015/go-gc.pdf for the purposes of the talk.
1. What’s new in Go 1.5
Aaron Taylor
@ataylor0123
aaron@meta.sc
2. Package System
• Internal packages
• import disallowed to packages outside the parent
of the “internal” directory
• Experimental vendoring support
• import “p” => import “d/vendor/p”
• enable with: GO15VENDOREXPERIMENT=1
Go 1.4 "Internal" Packages
Go 1.5 Vendor Experiment
5. Compiler and Runtime
• All C code translated to Go
• automated with optimizations using grind, gofmt
• builds 10x slower => 2x slower
• Just one compiler now
• 6g, 6a, 6l, 8a, 8g, etc. are all gone
• new tooling available
• trace
GopherFest 2015: Rob Pike on the move from C to Go in the toolchain
6. True Parallelism
• GOMAXPROCS = number of logical CPUs
• enabled by goroutine scheduler improvements
• previously, slowdowns were possible when
parallelism was increased
Go 1.5 GOMAXPROCS Default
as with any new language, lots of gotchas (things you might have heard/read)
concurrency single threaded
sub-par GC
No dependency management
I’ve been looking forward to seeing Go’s solutions to it’s initial growing pains
Go 1.5 fixes many of them
Internal Packages: enable the elimination of private duplicate code in the std-lib
used in appengine libraries
Vendoring: builtin way to manage dependencies
third party tools will handle creating this structure
great talk on this by Rob Pike
lots of optimizations necessary in changing idiomatic C to idiomatic Go
will make community contributions much easier
tools enabled by the new Go runtime:
type safety
contiguous stack
no strange C compiler optimizations
creates a chain of 100 goroutines connected by channels and times how long it takes an integer message to propagate from one end to the other. ChainBuf uses buffered channels
prime sieve also uses many goroutines but has more opportunity for parallelism
There are still programs that do not run as nicely. For example, the Go port of Doug McIlroy's power series program is almost a worst case for GOMAXPROCS > 1: it creates many ephemeral goroutines, arranges the communication pattern in a tree, and has no use for parallelism
This slide got a standing ovation at GopherCon 2015