STINNER Victor <victor.stin...@gmail.com> added the comment:

I suggest you to take a look at my perf project which has a timeit function and 
command. perf has a different design: it stores all values, and so many 
statisticals functions can be used. By the way, it does include most common 
statistical functions in its API, and provide a few more in the CLI.

The timeit module of the stdlib computes 5 values by default... I'm not sure 
that it's revelant to compute the standard deviation only on 5 values. perf 
computes 60 values and computes then in 20 different processes (run 
sequentially). With 60 values, I expect that the computing statistics makes 
more sense.

About the PR itself, I dislike providing a fixed list of statistical functions. 
For example, what if someone needs the geometric mean? What if you want to 
count outliers? etc.

If someone really wants timeit to evolve, I suggest to return all values rather 
than only the minimum: as repeat() does.

By the way, using the minimum is IMHO a bad idea, but I already proposed to 
change timeit, and my change was rejected because of the backward compatibility.

I decided to stop trying to convince other core developers and leave the timeit 
module unchanged, with all its bugs. And instead, I suggest to everyone to stop 
using it (PyPy also warns users and asks to use perf instead), and use perf 
timeit instead...

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32589>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to