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.
I have compared output between pre- and post-patch runs of these tests
to make sure there's nothing missing and nothing broken, on both
Windows and Linux. The only differences I found were actually tests
that were previously *not* run.
This allows manual selection of a specific unit such as usecs rather than the
use of a heuristic. This is intended to aid machine processing of timeit
output.
Patch by Serhiy Storchaka.