
import time

matches = {"Foo", "Bar"}
start = time.time()
for x in xrange(1000000):
    name = "This String is Foo Bar"
    for s in matches:
        name = name.replace(s, "")
print time.time() - start