[issue32589] Statistics as a result from timeit

STINNER Victor report at bugs.python.org
Sat Jan 20 04:09:13 EST 2018


STINNER Victor <victor.stinner at gmail.com> added the comment:

"but after
looking more closely at the PR, I see that the statistics gathered
are from the (default) 1000000 runs of each call to timer.timeit()."

Ah, don't do that. Timeit runs the same code multiple times and computes
the average to compute one value on purpose. Reading a timer takes time,
and measures smaller than 1 ms are unstable.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32589>
_______________________________________


More information about the Python-bugs-list mailing list