Real Problems with Python

Vladimir Marangozov Vladimir.Marangozov at inrialpes.fr
Mon Feb 14 13:57:37 EST 2000


Tim Peters wrote:
> 
> [NeelK]
> >    In the long run, the solution is to use a conservative garbage
> >    collection algorithm (such as the Boehm collector),
> 
> [Tim]
> > "No chance" in CPython [...]
> 
> [François Pinard]
> > I'm not sure of the implications of the above, but one sure thing
> > is that I very much like the current implications of reference
> > counting.  When I write:
> >
> >     for line in open(FILE).readlines():
> >
> > I rely on the fact FILE will automatically get closed, and very soon
> > since no other references remain. ...
> 
> Yes, that's exactly the kind of thing that makes many CPython users
> consider RC to be "a feature".  There's no reason at all to believe
> that CPython will ever give this up; even NeilS's BDW patch for CPython
> retains refcounting, simply for *speed* reasons (RC has excellent
> locality of reference, especially when trash is being created and
> recycled at high dynamic rates).
> 

That last one is a good one. So far, nobody has shown any evidence that
LOR is good or bad when different objects are involved (except, I
remember,
some special cases like iterating over ints that happen to be allocated
close to each other). Better yet, nobody _can_ show such evidence as far
as one stays on top of a virtual memory manager.

make-that-simply-"RC-is-faster-than-the-alternatives"-<wink>-
-and-I'll-take-it-ly y'rs
-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov at inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252



More information about the Python-list mailing list