Fastest technique for string concatenation

Carey Tilden carey.tilden at gmail.com
Sat Oct 2 16:17:02 EDT 2010


On Sat, Oct 2, 2010 at 12:09 PM, <python at bdurham.com> wrote:

> My understanding is that appending to a list and then joining this list when done is the fastest technique for string concatenation. Is this true?

Have you profiled an application and found string concatenation to be
a performance bottleneck?  I would be surprised, but it's always
possible.  If not, I'd suggest you choose the technique that is most
clear and concise, and worry about performance only if it becomes a
real issue.

Carey



More information about the Python-list mailing list