[pypy-commit] pypy default: add a hint

fijal pypy.commits at gmail.com
Sat Nov 11 16:06:26 EST 2017


Author: fijal
Branch: 
Changeset: r92991:e5bfccc9fd98
Date: 2017-11-11 16:05 -0500
http://bitbucket.org/pypy/pypy/changeset/e5bfccc9fd98/

Log:	add a hint

diff --git a/pypy/objspace/std/bytearrayobject.py b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -385,6 +385,7 @@
 
     @specialize.argtype(1)
     def _inplace_add(self, other):
+        resizelist_hint(self._data, len(self._data) + len(other))
         for i in range(len(other)):
             self._data.append(other[i])
 


More information about the pypy-commit mailing list