Steven D'Aprano <st...@pearwood.info> writes: > First question is, why do you care that it's slower? The difference between > the fastest and slowest functions is 1.16-0.33 = 0.83 microsecond.
That's a 71% speedup, pretty good if you ask me. > If you call the slowest function one million times, your code will > run less than a second longer. What if you call it a billion times, or a trillion times, or a quadrillion times, you see where this is going? If you're testing 100-digit numbers, there are an awful lot of them before you run out. -- http://mail.python.org/mailman/listinfo/python-list