setup = 's = "a" * {0}'
times = [timeit.timeit(stmt=stmt.format(i / 2, i / 3, i / 4), setup=setup.
    format(i + 1), number=10) for i in range(1000000)]
sum(times) * 1.0 / len(times)
times[-1]
How are basic data types (strings and integers) implemented in Python and Perl