[pypy-dev] [pypy-commit] pypy default: issue1059 testing

Alex Gaynor alex.gaynor at gmail.com
Tue Feb 21 17:25:28 CET 2012

On Tue, Feb 21, 2012 at 11:21 AM, Carl Friedrich Bolz <cfbolz at gmx.de> wrote:

> On 02/20/2012 06:50 PM, Alex Gaynor wrote:
> > Unfortunately this commit has some bad effects.  Going through an
> > iterator in popitem() will result in O(N**2) behavior for repeated
> > calls.  If you look at the r_dict implementation of popitem() you can
> > see the fix there.
> This is just the default implementation for the DictStrategy base class.
> All interesting subclasses override this default. The segfault happened
> because the dict proxy strategy doesn't override it.
> So yes, calling A.__dict__.popitem repeatedly for a class A is O(N**2). Do
> we care?
> Cheers,
> Carl Friedrich
> ______________________________**_________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/**mailman/listinfo/pypy-dev<http://mail.python.org/mailman/listinfo/pypy-dev>

No, anyone doing that deserves what they get ;)  Sorry I missed that the
subclass overrode it.


"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120221/8dd2b18f/attachment.html>

More information about the pypy-dev mailing list