‹ BackHN Continuity

Thread

A 40ms Go garbage collector pause caused by swap

63 points · 28 comments · shellpipe

  1. raverbashing · · focus · HN ↗
    I don't get why people do not prefer reference counting, it has more predictable runtime performance

    (though of course a swap is a swap - but you can "trigger" it depending on your memory or file access pattern)

    1. groestl · · focus · HN ↗
      Overhead per allocation, if you care about that, and reference circles.
    2. bheadmaster · · focus · HN ↗
      > more predictable runtime performance

      Not really, reference counting can cause a single object deallocation to trigger an arbitrarily long chain of deallocations.

    3. xxs · · focus · HN ↗
      ref counting is expensive in multi-threaded applications. Overall it would have worse performance. When it comes to predictability: deallocating a linked list (for instance) would have to deallocate all of the elements. Dealing with loops is also not simple, either.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.