On Wed, Feb 12, 2020 at 2:56 PM Robert Engels <reng...@ix.netcom.com> wrote:
> GCs have radically improved since then - at least in practical > implementation. > > Again, see G1, Metronome, Zing or Shenandoah - none of these were > available in 2005. > > (Or even Go's GC performance progression - but as I mentioned, in this > particular test the lack of a generational collector is holding it back). > I just want to add a note that, as we've said before, it's not obvious that the generational hypothesis holds for real Go code. See the discussion by Rick Hudson at https://blog.golang.org/ismmkeynote. The generational hypothesis does seem to hold for languages like Java, and for those languages generational GC is a win. It's not obvious that it is a win for Go. So far the experimental evidence for that claim is lacking, and it's not for lack of trying. (Background for those who don't follow GC: the generational hypothesis is "most objects die in the nursery", or, to put it another way, most objects die quickly. In Go, on the other hand, it appears that most objects live on the stack, and thus die without being allocated or examined by the collector. While of course in Go some heap objects die quickly, it's not obvious that most do, and if most objects don't die quickly then generational GC is a lot of work for little gain. To make things worse, in real Go programs programmers tend to use pools (either sync.Pool or hand rolled) for objects that die quickly, so again generational GC doesn't help. It's possible that if Go had generational GC people would use fewer pools, but it's also true that for typical uses pools are likely to be more efficient than generational GC.) Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXh1ke9giEi6bTsB51ajyb%2BcJASPB79tWEBHbYcv%2B%2B2ew%40mail.gmail.com.