[Speed] Tool to run Python microbenchmarks

Maciej Fijalkowski fijall at gmail.com
Fri Feb 12 11:02:39 EST 2016

On Fri, Feb 12, 2016 at 4:58 PM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> Hi,
> 2016-02-12 16:42 GMT+01:00 Maciej Fijalkowski <fijall at gmail.com>:
>> timeit does two really terrible things - uses min(time) and disables
>> the garbage collector, which makes it completely unreliable.
> Can you please elaborate why using min(times) is a bad idea?
> I'm also using min() in my tool, I expect that it helps to ignore the
> sporadic peeks when the system is unstable.
> Victor

Yes, it also helps to ignore systematic peaks that will happen
randomly (due to cache alignment, memory ordering, dicts etc.). Some
operations are really random that you should not ignore. E.g. if you

l.append('a') in a loop, you gonna ignore all the places that resize loop.

I'll look for a reference

More information about the Speed mailing list