import timeit from random import choice from random import randrange from string import uppercase setup = """ class additive_identity(object): def __add__(self, other): return other ai = additive_identity() from random import choice from random import randrange from string import uppercase strings = ["".join(choice(uppercase) for i in range(randrange(10))) for i in range(100)]""" strings = ["".join(choice(uppercase) for i in range(randrange(10))) for i in range(100)] print "SUM:", timeit.Timer("sum(strings, ai)", setup).repeat() print "JOIN:", timeit.Timer("''.join(strings)", setup).repeat() print "ADD:", timeit.Timer(" + ".join('"' + s + '"' for s in strings), "").repeat()