James Stroud <[EMAIL PROTECTED]> wrote: >py> t = timeit.Timer(stmt=s) >py> print "%.2f usec/pass" % (1000000 * t.timeit(number=100000)/100000) >40.88 usec/pass
7stud <[EMAIL PROTECTED]> wrote: >What does this accomplish: > >1000000 * t.timeit(number=100000)/100000 > >that the following doesn't accomplish: > >10 * t.timeit(number=100000) The first example converts from seconds per 100000 passes to microseconds per pass in two steps, while the second example does it one. The first example is more easily understood and maintainable than the second example. Ross Ridge -- l/ // Ross Ridge -- The Great HTMU [oo][oo] [EMAIL PROTECTED] -()-/()/ http://www.csclub.uwaterloo.ca/~rridge/ db // -- http://mail.python.org/mailman/listinfo/python-list