[pypy-commit] pypy.org extradoc: Comment that this string-concatenation example does not apply on bytearrays.

arigo pypy.commits at gmail.com
Mon Jul 1 06:47:04 EDT 2019


Author: Armin Rigo <arigo at tunes.org>
Branch: extradoc
Changeset: r951:9fc40ec9dd54
Date: 2019-07-01 12:46 +0200
http://bitbucket.org/pypy/pypy.org/changeset/9fc40ec9dd54/

Log:	Comment that this string-concatenation example does not apply on
	bytearrays.

diff --git a/source/performance.txt b/source/performance.txt
--- a/source/performance.txt
+++ b/source/performance.txt
@@ -226,7 +226,9 @@
 
 the JIT cannot optimize out intermediate copies.  This code is
 actually quadratic in the total size of the mylist strings due to
-repeated string copies of ever-larger prefix segments.
+repeated string copies of ever-larger prefix segments.  (Such code
+is always fine for bytearrays, because in this case ``+=`` is an
+in-place operation.)
 
 This::
 


More information about the pypy-commit mailing list