Re:Low-Latency, High-Throughput Garbage Collection [pdf]
by munificent on Monday April 25, 2022 @01:15PM
(#31157877)
> cites some external work showing tracing garbage collection as a lazily evaluated form of reference counting (using a saturating 1-bit counter) taken to the limit.
Yup. The paper you're thinking of is "A Unified Theory of Garbage Collection":
https://courses.cs.washington.edu/courses/cse590p/05au/p50-b...
Eagerly updated single-bit reference counts are useful if you have a lot of code that allocates buffers, passes them to helper functions to get filled (potentially defeating static escape analysis), passes them to consuming functions, and then returns. A single bit to track if a reference to that buffer has ever been stored into another object will allow for early collection in the common case.
On a side note, the Garbage Collection handbook (and many practitioners) consider reference counting to be a form of garbage collection. What some people narrowly define as GC is tracing garbage collection.