String Concatenation O(n^2) (was: Re: Explaining Implementing a Binary Search Tree.)

Ian Kelly ian.g.kelly at
Mon Jun 16 21:16:18 CEST 2008

On Mon, Jun 16, 2008 at 12:07 PM, Alex Elder <alexelder at> wrote:
> I found this article useful when dealing with strings in Python:
> It may help squeeze some more time out of your code. 8-)

Things seem to have changed since then.  I'm finding that method 4 is
about 15% faster than method 5.  Whether the change is due to using a
different Python version, processor, or operating system, I couldn't

I used Python 2.5.2 on an Intel Core 2 at 2 GHz running Windows XP, SP2.


More information about the Python-list mailing list