On 12.02.13 22:03, Maciej Fijalkowski
We recently encountered a performance issue in stdlib for pypy. It
turned out that someone commited a performance "fix" that uses += for
strings instead of "".join() that was there before.
Now this hurts pypy (we can mitigate it to some degree though) and
possible Jython and IronPython too.
How people feel about generally not having += on long strings in
stdlib (since the refcount = 1 thing is a hack)?
What about other performance improvements in stdlib that are
problematic for pypy or others?
Personally I would like cleaner code in stdlib vs speeding up CPython.
Typically that also helps pypy so I'm not unbiased.
Python-Dev mailing list
Funny coincidence that this issue came up an hour after I asked
string_concat optimization absence on the pypy channel.
I did not read email while writing the "efficient
Maybe we should use the time machine, go backwards and undo the
patch, although it still makes a lot of sense and is fastest,
at least on CPython.
Which will not matter so much for PyPy of course because _that_ goes
Alas, the damage to the mindsets already has happened, and the cure
will probably be as hard as the eviction of the print statement,
But since I'm a complete Python 3.3 convert (with consequent changes
to my projects which was not so trivial),
I think to also start publicly saying that "s += t" is a pattern
not be used in the Gigabyte domain, from 2013.
Actually a tad, because it contradicted normal programming patterns
in an appealing way. Way too sexy...
But let's toss it. Keep the past eight years in good memories as an
period of liberal abuse. Maybe we should add it as an addition to
"Zen of Python":
There are obviously good things, but "obvious" is the finest liar.
Christian Tismer :^) <mailto:email@example.com>
Software Consulting : Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/
14482 Potsdam : PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776 fax +49 (30) 700143-0023
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/