[pypy-issue] [issue1599] quadratic time in list.extend(sometuple)

Armin Rigo tracker at bugs.pypy.org
Wed Sep 25 11:37:53 CEST 2013


Armin Rigo <armin.rigo at gmail.com> added the comment:

Found the reason: the problem is indeed not the 2nd call to _resize_list() in
_extend_from_iterable(), which is never called in this example.  The problem is
the 1st call.  It resizes by growing the list to *exactly* the specified size,
instead of overallocating a bit.  See the 'overallocate' argument to
_ll_list_resize_hint_really().  We need to figure out if it ever makes sense to
pass False here, or if we shouldn't just always overallocate.

----------
nosy: +arigo

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1599>
________________________________________


More information about the pypy-issue mailing list