]> granicus.if.org Git - python/commit
timeit: start autorange with 1 iteration, not 10
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 18 Oct 2016 15:06:56 +0000 (17:06 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 18 Oct 2016 15:06:56 +0000 (17:06 +0200)
commitf8fb82cd25739fc2fe67c5e6997af28f2a5590d3
treebebffd97163aa6d225f9365157bd230324a4312e
parentbf9655854bec3e4cddc0580e815938f9f678cd23
timeit: start autorange with 1 iteration, not 10

Issue #28240: timeit autorange now uses a single loop iteration if the
benchmark takes less than 10 seconds, instead of 10 iterations.

"python3 -m timeit -s 'import time' 'time.sleep(1)'" now takes 4 seconds
instead of 40 seconds.
Lib/test/test_timeit.py
Lib/timeit.py
Misc/NEWS