

Go 1.4 Release Candidate 2 is Out - zachgersh
https://groups.google.com/forum/#!msg/golang-nuts/AXBjhN3xvjI/XhlvfBqN-VwJ

======
kbuck
The Go 1.4 release notes[1] mention a "fully precise" garbage collector, but I
thought this was one of the major highlights in the 1.3 release? (The notes[2]
for the 1.3 release say: "For a while now, the garbage collector has been
precise when examining values in the heap; the Go 1.3 release adds equivalent
precision to values on the stack.") What's up with that?

[1]: [http://tip.golang.org/doc/go1.4](http://tip.golang.org/doc/go1.4)

[2]: [http://golang.org/doc/go1.3](http://golang.org/doc/go1.3)

~~~
davecheney
This is perhaps a bit misleading. What was achieved in 1.3 was a collector
that was precise for the heap and the stack. In doing so it enabled the new
stack copying mode for more efficient stack growth.

However not all code could take advantage of stack copying, so sometimes it
would fall back to the old stack splitting behaviour. The magic code that
would decide if you split or copied was, apparently, the runtime, stuff like
channel send and receive, map operations, which if they needed to grow the
stack would require splitting as this code was written in C not Go and the c
compiler didn't emit the right magic for the stack walking code which decided
if you split or copied.

In 1.4 due to rewrite of th Go facing parts of the runtime the stack walker,
garbage collector and stack growth code always knows the state of every call
frame so can always copy the stack. This resulted in a metric shed tonne of
corner cases being deleted from those parts of the runtime. So, what was
precise before, is now even more precise. o_O

In 1.5, the remaining c code in the runtime will be converted to go, meaning
the go standard library is written only in go. Yay, no more weird c89(ish) c
code in the runtime.

