Speed of string += string

Dave Brueck dave at pythonapocrypha.com
Sat Apr 12 15:31:30 EDT 2003


On Sat, 12 Apr 2003, Mads Orbesen Troest wrote:

> Given that strings are immutable, is it exceedingly slow (and memory
> spiking) to do a lot of "string += string" operations in one's code?
[snip]
> that the longer the string to which stuff is appended is, the longer times
> each += operation takes?

When you tried it out yourself and timed the results, what did the results
indicate?

-Dave





More information about the Python-list mailing list