Re: [Python-Dev] making weakref.ref objects subclassable

On Wednesday 30 June 2004 11:46 pm, Tim Peters wrote:
Well, there is no change to gcmodule.c, except for the indirect change in what the PyWeakref_Check() macro expands to. The risks with weakrefs
The change in the macro expansion is exactly what I was referring to; not a source change, but a real change none the less.
For reasons given above, I believe gc performance will be virtually unchanged for almost all programs.
That was my conclusion as well. Empirical evidence with the Zope 3 test suite suggests that's right. If anyone has an application that would be meaningfully affected by this change, I'd be rather surprised, and would appreciate hearing about it. -Fred -- Fred L. Drake, Jr. <fred at zope.com> Zope Corporation

[Tim]
For reasons given above, I believe gc performance will be virtually unchanged for almost all programs.
[Fred Drake]
For the reasons given before, that won't happen. The analysis I gave was based on a complete understanding of every gory detail of how Python's gc works -- there's simply nothing risky about this change wrt gc performance. Empirical validation is unnecessary <wink>. If people want to surprise us, better they spend time writing nasty new tests of weakref subclassing!
participants (2)
-
Fred Drake
-
Tim Peters