Hi Victor,

On 2 June 2016 at 03:19, Victor Stinner <victor.stin...@gmail.com> wrote:
> 5 timeit output ("1000000 loops, best of 3: ... per loop"):
>
> * 0.247 usec
> * 0.252 usec
> * 0.247 usec
> * 0.251 usec
> * 0.251 usec
>
> 5 perf.timeit outputs ("Average: 25 runs x 3 samples x 10^6 loops: ..."):
>
> * 250 ns +- 3 ns
> * 250 ns +- 3 ns
> * 251 ns +- 3 ns
> * 251 ns +- 4 ns
> * 251 ns +- 3 ns

Looks good.  IMHO the important bit is that `timeit` is simple to use,
readily available, and gives just a number, which makes it very
attractive for people.  Your output would achieve the same result
(with the `+-` added, which is fine) assuming that it eventually
replaces `timeit` in the standard library.

I know there are many good reasons for why getting just a single
number is not enough, but I'd say that we still need to achieve the
best practical results given that constrain.  The results you posted
above seem to show that `perf.timeit` is better than `timeit` at doing
that, and I believe that it's a great step forward.


A bientôt,

Armin.
_______________________________________________
Speed mailing list
Speed@python.org
https://mail.python.org/mailman/listinfo/speed

Reply via email to