Python and Boehm-Demers GC, I have code.

Neil Schemenauer nascheme at ucalgary.ca
Sat Jul 17 10:08:21 EDT 1999


[Tim]
>Just as it appeared <wink>.  So it's really no surprise that the overall
>timing didn't change much in pybench, right?

I'm surprised.  The collection of reference cycles is coming for
free.  I expected there to be some speed tradeoff.  So far the
only problem I see is sorting out the mallocs (ie. extension
modules may use their own malloc).  This should be done anyhow in
order for alternate Python malloc implemetations to be used.  The
other problem is objects that expect not to be collected even
though Python has no references to them (Tkinter callbacks).  I
don't think this problem is unsolvable.  Things are much better
than I expected.

With some tuning maybe the gc version of Python will perform
better than the regular version.

[Tim on Tkinter callbacks being collected]
>It's convoluted for sure, but I do expect you'll find "the answer" at the
>bottom of it.
>
>rc-is-so-simple<wink>-ly y'rs  - tim

This is really nasty.  I am trying to allocate this data with
regular malloc.  If I use malloc and free then this data should
not get collected and the GC should realize that the Python
functions still have references to them.  So far I am not having
much luck with this approach.  It would help if I totally
understood what was happening here.  I have more work to do.


    Neil




More information about the Python-list mailing list