from timeit import repeat

KWARGS = {
    'number': 10000,
    'repeat': 5,
    'setup': 's="PlanB"'
}

print(repeat('s + s + s + s + s + s + s + s + s + s', **KWARGS))
# [0.006932262011105195, 0.008613309997599572, 0.00679597002454102, 0.006543160998262465, 0.006942235020687804]

print(repeat('s * 10', **KWARGS))
# [0.0012486269988585263, 0.0011630640074145049, 0.001156529993750155, 0.001117073989007622, 0.001210635993629694]

print(repeat("""
res = ''
for _ in range(10):
    res += s
""", **KWARGS))
# [0.013256769016152248, 0.012365422997390851, 0.013883235020330176, 0.011546263005584478, 0.011848157009808347]

print(repeat('"".join(s for _ in range(10))', **KWARGS))
# [0.01634740098961629, 0.01871111898799427, 0.015171383012784645, 0.014535599999362603, 0.01316969600156881]

from timeit import repeat

KWARGS = {
    'number': 10000,
    'repeat': 5,
    'setup': 's="PlanB"'
}

print(repeat('s + s + s + s + s + s + s + s + s + s', **KWARGS))
# [0.006932262011105195, 0.008613309997599572, 0.00679597002454102, 0.006543160998262465, 0.006942235020687804]

print(repeat('s * 10', **KWARGS))
# [0.0012486269988585263, 0.0011630640074145049, 0.001156529993750155, 0.001117073989007622, 0.001210635993629694]

print(repeat("""
res = ''
for _ in range(10):
    res += s
""", **KWARGS))
# [0.013256769016152248, 0.012365422997390851, 0.013883235020330176, 0.011546263005584478, 0.011848157009808347]

print(repeat('"".join(s for _ in range(10))', **KWARGS))
# [0.01634740098961629, 0.01871111898799427, 0.015171383012784645, 0.014535599999362603, 0.01316969600156881]

# [0.006932262011105195, 0.008613309997599572, 0.00679597002454102, 0.006543160998262465, 0.006942235020687804] # [0.0012486269988585263, 0.0011630640074145049, 0.001156529993750155, 0.001117073989007622, 0.001210635993629694] res = '' for _ in range(10):     res += s # [0.013256769016152248, 0.012365422997390851, 0.013883235020330176, 0.011546263005584478, 0.011848157009808347] # [0.01634740098961629, 0.01871111898799427, 0.015171383012784645, 0.014535599999362603, 0.01316969600156881]