[issue30080] Add the --duplicate option for timeit

2022-03-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue30080] Add the --duplicate option for timeit

2017-06-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, I even didn't know that "perf timeit" supports -n since it doesn't report the number of loops. And seems it runs the benchmark much more times, since even with -n1 it is slow. If the number of loops is determined automatically, it would do not matter.

[issue30080] Add the --duplicate option for timeit

2017-06-07 Thread STINNER Victor
STINNER Victor added the comment: About the command line interface, I would expect that "timeit -n 10 --duplicate 10 STMT" would run STMT 100 times. I chose this behaviour in perf timeit: http://perf.readthedocs.io/en/latest/cli.html#timeit-cmd Current behaviour chosen by Serhiy, -n3

[issue30080] Add the --duplicate option for timeit

2017-05-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue30080] Add the --duplicate option for timeit

2017-04-16 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -Guido.van.Rossum, gvanrossum ___ Python tracker ___

[issue30080] Add the --duplicate option for timeit

2017-04-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 I've long used this technique when timing fast statements. See https://code.activestate.com/recipes/577834 for an example. -- ___ Python tracker

[issue30080] Add the --duplicate option for timeit

2017-04-16 Thread Armin Rigo
Changes by Armin Rigo : -- nosy: -arigo ___ Python tracker ___ ___

[issue30080] Add the --duplicate option for timeit

2017-04-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1290 ___ Python tracker ___ ___

[issue30080] Add the --duplicate option for timeit

2017-04-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: One of the most used by me option of the "perf timeit" subcommand is --duplicate. It duplicates statements to reduce the overhead of the loop. This is necessary when measure the time of very fast statements. Proposed patch adds this option for CLI of the