News for hackers. Stuff that matters.
Re:Reference count, don't garbage collect by KerrAvon on Saturday July 30, 2022 @01:53AM (#32284598)
Your first paragraph is only true if malloc/free counts as GC. I have seen people try to claim that free() is just manual GC. You can say that if you want, but it renders the terminology meaningless.

Any true GC strategy (== one that collects cycles) will fundamentally touch and allocate more memory than malloc/free, where reference counting is pretty close to malloc/free performance; it doesn’t need to touch any memory not involved. At OS scale, that’s a huge performance advantage. You can scope down the memory involved in GC using advanced, modern GC techniques, but you’re still going to be behind malloc/free in overall efficiency — cache efficiency, memory maintenance overhead, and additional memory required for bookkeeping. And reference counting will be pretty darn close to malloc/free.

Re:Reference count, don't garbage collect by pjmlp on Saturday July 30, 2022 @04:24AM (#32285212)
Re:Reference count, don't garbage collect by bruce343434 on Saturday July 30, 2022 @04:25AM (#32285215)
It puts that "extra memory" inside the very objects it tracks with a... reference count.