Xref: utzoo comp.lang.c++:4527 comp.lang.eiffel:384 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!hellgate.utah.edu!cs.utexas.edu!usc!polyslo!ttwang From: ttwang@polyslo.CalPoly.EDU (Thomas Wang) Newsgroups: comp.lang.c++,comp.lang.eiffel Subject: reference counting vs. gargabe collection Message-ID: <14149@polyslo.CalPoly.EDU> Date: 1 Sep 89 05:20:13 GMT Reply-To: ttwang@polyslo.CalPoly.EDU (Thomas Wang) Distribution: na Organization: Cal Poly State University -- San Luis Obispo Lines: 20 I am reading the book "Object-oriented Software Construction". One of the paragraph reads: [Reference counting] is wasteful of both time and space: every operation on a reference, including simple assigment, now involve some arithmetic and tests; and an extra integer field must be added to each object. I always thought that garbage collection takes longer than reference counting. Is there any research to show this in fact is not the case? This is comparing the total running time of reference counting versus on-the-fly garbage collection. I am thinking about a system that uses reference counting to reclaim normal objects, and garbage collection to reclaim circular objects. If reference counting has worse performance than garbage collection, then this approach is not a good idea. -Thomas Wang ("I am, therefore I am." - Akira ) ttwang@polyslo.calpoly.edu