I agree that += should not be used as an optimization (on strings) in
On Tue, 12 Feb 2013 23:03:04 +0200
Maciej Fijalkowski <firstname.lastname@example.org> wrote:
> 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)?
the stdlib code. The optimization is there so that uncareful code does
not degenerate, but deliberately relying on it is a bit devilish.
(optimisare diabolicum :-))