Chapter 5, https://gchandbook.org/
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.
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.