1. 8

  2. 3

    There’s always a lot of discussion about the changes and updates to Go’s garbage collector. How does it compare with the two versions Java has that are being discussed here??

    1. 2

      At a high level, go’s gc is very primitive compared to java’s. Go gets some win in the gc department because it has value objects and (in my experience) better escape analysis. Go values also don’t have to be boxed to be put in a collection and they don’t require a builtin monitor. All this makes the go gc have to do less work.

      Current gc work is focused on improving latency by making guarantees about pause times ( no more than 10 out of 50ms in stw gc). The gc is being improved in other areas too.