[Python-ideas] Create a StringBuilder class and use it everywhere

Antoine Pitrou solipsis at pitrou.net
Thu Aug 25 18:40:44 CEST 2011

On Thu, 25 Aug 2011 18:28:34 +0300
k_bx <k.bx at ya.ru> wrote:
> I don't mind using u''.join, but it just doesn't make people think about speed at all.

Realistically, not many workloads have performance issues with string
concatenation in the first place. So not caring is the right thing to
do in most cases.

> The most popular (as from what I can see) thing right now where people start seeing
> that += is slow is when they try to do that on PyPy (which doesn't have hack like CPython,
> who is still slow) and ask "why my pypy code is sooooo slow".

Different implementations having different performance characteristics
is not totally unexpected, is it?
(and I'm sure the PyPy developers wouldn't mind adding another hack)



More information about the Python-ideas mailing list