String Concatenation O(n^2) (was: Re: Explaining Implementing a Binary Search Tree.)
Ian Kelly
ian.g.kelly at gmail.com
Mon Jun 16 15:16:18 EDT 2008
On Mon, Jun 16, 2008 at 12:07 PM, Alex Elder <alexelder at gmail.com> wrote:
> I found this article useful when dealing with strings in Python:
>
> http://www.skymind.com/~ocrow/python_string/
>
> 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
say.
I used Python 2.5.2 on an Intel Core 2 at 2 GHz running Windows XP, SP2.
-Ian
More information about the Python-list
mailing list