New issue 1843: Repeated string concatenation performance
https://bitbucket.org/pypy/pypy/issue/1843/repeated-string-concatenation-performance
Armin Rigo:
The following is clearly a bogus example, doing precisely what we should not do
to concatenate a large list of small strings. However, it is written in such a
way that CPython's optimization doesn't work. Nevertheless, CPython runs in
4.5 seconds but PyPy takes 24.6 seconds, which is more than 5x slower.
lst = ["xy"] * 200000
def f():
y = ''
for x in lst:
y += x
z = y
f()
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue