New submission from STINNER Victor:

In the issue #28240, I changed the default repeat from 3 to 5 in timeit. Serhiy 
wrote (msg277157): "For now default timeit run takes from 0.8 to 8 sec. Adding 
yet 5 sec makes a user more angry."

I propose to use powers to 2, instead of powers of 10, in timeit autorange to 
reduce the total duration of the microbenchmark.

* Without the patch, the worst case: 4.0 * 6 = 24 seconds.
* With the patch, the worst case is: 0.4 * 6 = 2.4 seconds

* 6: autorange (1 iteration) + 5 repeatition
* autorange uses a minimum of 200 ms, so the worst case is 200 ms * 10 before, 
or 200 ms * 2 after

----------
files: timeit_autorange_pow2.patch
keywords: patch
messages: 278899
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: timeit: use powers of 2 in autorange(), instead of powers of 10
type: performance
versions: Python 3.7
Added file: http://bugs.python.org/file45134/timeit_autorange_pow2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28469>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to