News for hackers. Stuff that matters.
Re:Groupcache: an alternative to memcached, written in Go by ablankst on Tuesday July 30, 2013 @05:57AM (#6126061)
In Go, and other type-safe languages, the compiler usually knows exactly which ints are being used as pointers. This is the difference between "precise" and "conservative" GC and is one of the reasons that comparing GC performance in C++ to GC performance in other languages is difficult.
Re:Groupcache: an alternative to memcached, written in Go by chetanahuja on Tuesday July 30, 2013 @01:48PM (#6128669)
I was under the impression (again, folk-lore, mailing lists etc.) that Go had a conservative collector. I can't find an official documentation link that'll tell me if it is or not at the moment.
Re:Groupcache: an alternative to memcached, written in Go by twotwotwo on Tuesday July 30, 2013 @05:06PM (#6130040)
This neat StackOverflow answer appears to be by the 'atom' fellow who contributed a patch to make the collector more precise (patch review = https://codereview.appspot.com/7307086/): http://stackoverflow.com/questions/7823725/what-kind-of-garb...

Atom also says 1.0's was more conservative, but, as Brad also said, still didn't scan "objects such as []byte" (meaning all plain-old-data arrays? who knows). The Go 1.1 Release Notes mention the collector becoming more precise, which was a particular issue on 32-bit because big heaps could span a lot of the address space.

You can see the GC source itself doing some per-type switching: https://code.google.com/p/go/source/browse/src/pkg/runtime/m...

At some point, this sort of discussion probably gets you less useful info per unit effort than just playing with a Go distribution, trying out whatever toy programs you find interesting.