On Tue, Jun 24, 2008 at 5:20 PM, Dick Moores <[EMAIL PROTECTED]> wrote:
> Basically, I'm not worried, just curious. Not about the small differences, > but why did the use of the standard if __name__ == '__main__' result > it such speed? Because __name__ is not equal to "__main__", so you were basically skipping the whole test. The most common cause of unexpected timing results is tests that don't do what you think they do. The test code is not run in the main module. You can dig into the timeit module if you want the details. > Am I not doing the timing correctly? Right. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor