Message317279
> Wait, I didn't notice the change to the format of raw timings. It looks as a regression to me.
Do you mean that some applications may run timeit as a CLI and parse stdout to get raw values? Why doing so? timeit is a Python module, it's trivial to use its API to avoid using the CLI, no?
I don't think that the CLI output must not change.
master branch:
vstinner@apu$ ./python -m timeit -v '[1,2]*1000'
1 loop -> 1.73e-05 secs
2 loops -> 6.49e-05 secs
5 loops -> 0.000107 secs
10 loops -> 0.000173 secs
20 loops -> 0.000331 secs
50 loops -> 0.000798 secs
100 loops -> 0.00159 secs
200 loops -> 0.00304 secs
500 loops -> 0.00777 secs
1000 loops -> 0.0163 secs
2000 loops -> 0.0315 secs
5000 loops -> 0.0775 secs
10000 loops -> 0.154 secs
20000 loops -> 0.311 secs
raw times: 310 msec, 313 msec, 308 msec, 303 msec, 304 msec
20000 loops, best of 5: 15.2 usec per loop
Python 3.6:
vstinner@apu$ python3 -m timeit -v '[1,2]*1000'
10 loops -> 3.41e-05 secs
100 loops -> 0.000345 secs
1000 loops -> 0.00327 secs
10000 loops -> 0.0332 secs
100000 loops -> 0.325 secs
raw times: 0.319 0.316 0.319
100000 loops, best of 3: 3.16 usec per loop
Hum, the timings of the calibration (xx loops -> ...) should use the same function to format time to use ns, ms, etc. |
|
Date |
User |
Action |
Args |
2018-05-22 13:37:19 | vstinner | set | recipients:
+ vstinner, lemburg, tim.peters, brett.cannon, rhettinger, jcea, pitrou, ned.deily, steven.daprano, python-dev, serhiy.storchaka |
2018-05-22 13:37:19 | vstinner | set | messageid: <1526996239.31.0.682650639539.issue28240@psf.upfronthosting.co.za> |
2018-05-22 13:37:19 | vstinner | link | issue28240 messages |
2018-05-22 13:37:19 | vstinner | create | |
|