On 2007-06-14, Steven D'Aprano <[EMAIL PROTECTED]> wrote:

> However, having said that, the speed difference does seem to be real: even
> when I correct the above issue, I get a large time difference using
> either cProfile.run() or profile.run(), and timeit agrees:
>
>>>> f = bar().readgenome
>>>> timeit.Timer("f(open('cb_foo'))", "from __main__ import f").timeit(5)
> 18.515995025634766
>>>> timeit.Timer("readgenome(open('cb_foo'))", "from __main__ import 
>>>> readgenome").timeit(5)
> 0.1940619945526123
>
> That's a difference of two orders of magnitude, and I can't see why.

Is it independent of the test order?

What happens when you reverse the order?

What happens if you run the same test twice in a row?

-- 
Grant Edwards                   grante             Yow! Thank god!! ... It's
                                  at               HENNY YOUNGMAN!!
                               visi.com            
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to