Author: Philip Jenvey <[email protected]>
Branch: length-hint
Changeset: r57514:5ec22166aed2
Date: 2012-09-24 10:48 -0700
http://bitbucket.org/pypy/pypy/changeset/5ec22166aed2/

Log:    (fijal) don't overalloc in resizelist_hint ge

diff --git a/pypy/rpython/lltypesystem/rlist.py 
b/pypy/rpython/lltypesystem/rlist.py
--- a/pypy/rpython/lltypesystem/rlist.py
+++ b/pypy/rpython/lltypesystem/rlist.py
@@ -223,9 +223,7 @@
     guess lied).
     """
     allocated = len(l.items)
-    if allocated < newsize:
-        _ll_list_resize_hint_really(l, newsize, True)
-    elif newsize < (allocated >> 1) - 5:
+    if allocated < newsize or newsize < (allocated >> 1) - 5:
         _ll_list_resize_hint_really(l, newsize, False)
 
 @enforceargs(None, int, None)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to