Conservative GC can be faster than precise GC

In the debate between precise and conservative garbage collection, the prevailing belief is that precise is always better. However, the argument is not as simple as it seems. Conservative root-finding, where the collector assumes any integer on the stack is a heap address, can actually lead to faster systems in certain cases. Precise collectors may mark more objects as live than necessary, causing inefficiencies. Conservative collectors can avoid run-time overhead, smaller stack frames, and the need to emit stack maps, resulting in potentially better code generation. Anecdotal evidence suggests that conservative stack scanning can outperform precise scanning. Perhaps conservative garbage collection deserves a closer look when designing GC systems.

https://wingolog.org/archives/2024/09/07/conservative-gc-can-be-faster-than-precise-gc

To top