Message306303
timeit is cool, but it's not appropriate for all performance testing. For example, since it uses only a single Python process, anything that's cached is not a good candidate for timeit profiling. The classic example is timing imports. E.g. these are not the stats you're looking for:
$ python3 -mtimeit "import my.slow.module"
The timeit documentation should describe this caveat (are there others?) and possibly point to both cProfile and the 3rd party perf package as alternative ways to gather performance information. |
|
| Date |
User |
Action |
Args |
| 2017-11-15 19:43:16 | barry | set | recipients:
+ barry |
| 2017-11-15 19:43:16 | barry | set | messageid: <1510774996.46.0.213398074469.issue32039@psf.upfronthosting.co.za> |
| 2017-11-15 19:43:16 | barry | link | issue32039 messages |
| 2017-11-15 19:43:16 | barry | create | |
|