Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!apple!agate!darkstar!terra.ucsc.edu!daniel From: daniel@terra.ucsc.edu (Daniel Edelson) Newsgroups: comp.lang.c++ Subject: performance of GC Message-ID: <11296@darkstar.ucsc.edu> Date: 19 Jan 91 18:20:10 GMT Sender: usenet@darkstar.ucsc.edu Reply-To: daniel@terra.ucsc.edu (Daniel Edelson) Organization: University of California, Santa Cruz Lines: 28 From: chased@rbbb.Eng.Sun.COM (David Chase) Newsgroups: comp.lang.c++ Subject: Re: Smart Pointers -- A proposed language extension Date: 19 Jan 91 00:33:31 GMT References: Organization: Sun Microsystems, Mt. View, Ca. .... Edelson presents evidence that a fairly naive compacting C++ collector can run about as quickly as manual allocation.... Some of those measurements need to be reconducted and should be taken with a grain of salt. They are almost certainly relatively correct, though. They did demonstrate (and the conclusion is reliable) that for some data structures copying collection is substantially more efficient than other forms of reclamation. In particular, consider recursive destruction of a Tree data structure by the destructors, i.e., the deletion of the root of a tree causes the recursive deletion of the rest of the tree from the internal nodes to the leaves. This involves many menory references. The alternative, elimination of the tree in one constant time operation by the collector is vastly more efficient. Daniel Edelson daniel@cis.ucsc.edu