timeit command line
suggest changeProfiling concatenation of numbers. These times are from one old run, and that run used the older default of 3 repeats:
python -m timeit "'-'.join(str(n) for n in range(100))"
10000 loops, best of 3: 29.2 usec per loop
python -m timeit "'-'.join(map(str,range(100)))"
100000 loops, best of 3: 19.4 usec per loop
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents