msg278899 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-10-18 16:13 |
In the issue #28240, I changed the default repeat from 3 to 5 in timeit. Serhiy wrote (): "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 |
|
|
msg278905 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-10-18 16:25 |
"131072 loops" in a report looks not human friendly. I would prefer using a sequence of round numbers: 1, 2, 5, 10, 20, 50, 100, ... |
|
|
msg278906 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-10-18 16:27 |
> "131072 loops" in a report looks not human friendly. In my perf module, I use 2^n syntax for numbers larger than 1024. Syntax accepted in command line arguments. |
|
|
msg278915 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-10-18 17:04 |
The perf module doesn't report the number of loops by default. |
|
|
msg278916 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-10-18 17:07 |
> The perf module doesn't report the number of loops by default. Right, it's hidden by default. I consider that it's not an useful information for end users. If you want more details (see the number of inner and outer loops), use --verbose ("python3 -m perf timeit -v ...") or the stats commands ("python3 -m perf stats file.json"). |
|
|
msg279187 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-10-22 08:30 |
Following patch takes numbers from the sequence 1, 2, 5, 10, 20, 50, ... It also updates the documentation and tests. |
|
|
msg279245 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-10-23 09:26 |
timeit_autorange_numbers.patch: LGTM. |
|
|
msg279254 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-10-23 12:18 |
New changeset 8e6cc952adc6 by Serhiy Storchaka in branch 'default': Issue #28469: timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead https://hg.python.org/cpython/rev/8e6cc952adc6 |
|
|