Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Interest in generational GC for Python

Reply
Thread Tools

Interest in generational GC for Python

 
 
Borked Pseudo Mailed
Guest
Posts: n/a
 
      04-19-2009
Hello,

Is there any interest in generational garbage collection in Python these days ?

Anyone working on it ?

Thanks

 
Reply With Quote
 
 
 
 
Benjamin Peterson
Guest
Posts: n/a
 
      04-20-2009
Borked Pseudo Mailed <nobody <at> pseudo.borked.net>
writes:

>
> Hello,
>
> Is there any interest in generational garbage
> collection
> in Python these days ?
>
> Anyone working on it ?


The PyPy project has implemented more GC's than you want to
think about
including a ref counting gc, mark-sweep, and
several generational GCs and have
received excellent performance from them.
You should look at their new beta release.




 
Reply With Quote
 
 
 
 
Martin v. L÷wis
Guest
Posts: n/a
 
      04-20-2009
> Is there any interest in generational garbage collection in Python these days ?
>
> Anyone working on it ?


This is the time machine at work: the garbage collector in CPython *is*
generational (with three generations).

Regards,
Martin
 
Reply With Quote
 
Martin v. L÷wis
Guest
Posts: n/a
 
      04-20-2009
> I'm lost there. Isn't CPython using reference counting (i.e updating the
> object's state at each reference creation/deletion, and deleting the
> objects as soon as they have no more references to them) ? It seemed to
> me that generational GC only applied to periodic GCs, like tracing
> garbage collectors. Or is CPython using a mix of both technologies (to
> prevent cycles for example) ?


The latter, since Python 2.2. See Modules/gcmodule.c for implementation
details.

It can't really prevent cycles, but it can collect them once they become
garbage (and the garbage collector is triggered, in the right
generation). Objects not participating in cycles are released
immediately when they become unreachable.

Regards,
Martin
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generational Interfaces Carl Banks Python 5 01-26-2008 10:02 AM
Is there a python development site for putting up python librariesthat people might be interest in working on? Kenneth McDonald Python 3 10-25-2006 10:04 PM
generational garbage collection Arvind C++ 14 08-26-2005 06:23 PM
Any interest in a Python for .NET sprint at PyCon 04? Brian Lloyd Python 0 12-04-2003 03:15 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM



Advertisments