A couple garbage collector questions

Frank Mitchell frankm at bayarea.net
Fri Apr 20 03:26:22 EDT 2001


Daniel Berlin wrote:
> 
> On Fri, 20 Apr 2001 kragen at pobox.com wrote:
> 
> > Neil Schemenauer <nas at python.ca> writes:
> > > Kragen Sitaker wrote:
> > > > Reference-counting exacts very heavy performance costs, no
> > > > matter what you back it up with.
> > >
> > > Can you back that statement up with any data?
> >
> > Not right now, sorry --- too busy.  But if you happen to find data on
> > the other side, I'd be happy to hear about it.
> 
> So, in other words, your answer is "no".

While I don't have any references to empirical comparisons, the book
_Garbage Collection: Algorithms for Automatic Dynamic Memory
Managerment_ by Jones and Lins compares refcounting and tracing
algorithms.

The upshot from that book seems to be that comparisons are tricky at
best, but in general refcounting is more of a performance drag than
tracing: the accumulated overhead for pointer writes tends to outweigh
the pauses for collection.  (OTOH, hard real-time or distributed systems
may be happier with sophisticated refcounting, and for slowly-changing
data structures refcounts are perfectly acceptable.  With the extensive
compiler support described by Ms.[?] Schroeter, refcounts would be at
least competitive ... but how many compilers actually use that
technique?)

-- 
Frank Mitchell (frankm at bayarea.net)

Ridiculous Lucky Captain Rabbit King!  Lucky Captain Rabbit King
Nuggets are only for the youth!
-- Powerpuff Girls, "Jewel of the Aisle"



More information about the Python-list mailing list