Trivial performance questions

Peter Hansen peter at engcorp.com
Fri Oct 17 12:16:10 EDT 2003


Alex Martelli wrote:
> 
> So, for this kind of tasks as well as for many others, what you
> need is timeit.py from Python 2.3.  I'm not sure it's compatible
> with Python 2.1.3, which I understand you're constrained to use
> due to Zope -- I think so, but haven't tried.  It's sure quite
> compatible with Python 2.2.  

It is also quite compatible with Python 2.0, based on running 
successfully several of your following examples, so one would 
assume it will also run fine with Python 2.1.

A quick inspection of the code backs up the empirical evidence,
showing no Python 2.2+ dependencies that don't have automatic
fallbacks (as with the attempt to include itertools).

(Thanks for the tutorial on timeit.py Alex.  I've finally stuck 
it in all my older Python installations, after your repeated
helpful promptings!)

-Peter




More information about the Python-list mailing list