Use Python's `timeit` from a program but functioning the same way as the command line?

后端 未结 2 600
既然无缘
既然无缘 2020-12-09 06:14

For instance, documentation says:

Note however that timeit will automatically determine the number of repetitions only when the command-line interface

2条回答
  •  隐瞒了意图╮
    2020-12-09 06:58

    As of Python 3.6, timeit.Timer objects have an autorange function that exposes how number is determined for command line execution.

提交回复
热议问题