Hi

Use the "timeit" module, like so:

>>> from timeit import Timer
>>> t = Timer('[i for i in range(10000)]')  # The string is code to execute 
>>> (for timing)
>>> print t.timeit(100) # execute it 100 times and print the result
0.222389936447

I would appreciate it if you could present your results in this thread.
 I have also been wondering about timings for simple operations.

Thanks
Caleb

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to