Affiliation:
1. Australian National University, Canberra, Australia
Abstract
Reference counting and tracing are the two fundamental approaches that have underpinned garbage collection since 1960. However, despite some compelling advantages, reference counting is almost completely ignored in implementations of high performance systems today. In this paper we take a detailed look at reference counting to understand its behavior and to improve its performance. We identify key design choices for reference counting and analyze how the behavior of a wide range of benchmarks might affect design decisions. As far as we are aware, this is the first such quantitative study of reference counting. We use insights gleaned from this analysis to introduce a number of optimizations that significantly improve the performance of reference counting.
We find that an existing modern implementation of reference counting has an average 30% overhead compared to tracing, and that in combination, our optimizations are able to completely eliminate that overhead. This brings the performance of reference counting on par with that of a well tuned mark-sweep collector. We keep our in-depth analysis of reference counting as general as possible so that it may be useful to other garbage collector implementers. Our finding that reference counting can be made directly competitive with well tuned mark-sweep should shake the community's prejudices about reference counting and perhaps open new opportunities for exploiting reference counting's strengths, such as localization and immediacy of reclamation.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
7 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. The One Pass (OP) Compactor: An Intellectual Abstract;Proceedings of the 2024 ACM SIGPLAN International Symposium on Memory Management;2024-06-20
2. Low-latency, high-throughput garbage collection;Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation;2022-06-09
3. Automatic proofs of memory deallocation for a Whiley-to-C Compiler;Formal Methods in System Design;2021-08-16
4. Extended Memory Reuse;Proceedings of the 30th Symposium on Implementation and Application of Functional Languages;2018-09-05
5. FRC: a high-performance concurrent parallel deferred reference counter for C++;Proceedings of the 2018 ACM SIGPLAN International Symposium on Memory Management;2018-06-18