Timing a function object versus timeit

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Sat Nov 4 00:23:29 EST 2006


On Fri, 03 Nov 2006 18:02:37 -0800, Carl Banks wrote:

>>>> import timeit
>>>> timeit.Timer("foo(1)","from __main__ import foo")
> 1.1497418880462646


Well, that was scarily simple. 

Thank you.


-- 
Steven.




More information about the Python-list mailing list