Speed up this code?

Gregory Petrosyan gregory.petrosyan at gmail.com
Fri May 26 11:16:06 EDT 2006


# Paul Rubin's version
gregory at home:~$ python -mtimeit "import test2" "test2.primes(1000)"
100 loops, best of 3: 14.3 msec per loop

# version from the Cookbook
gregory at home:~$ python -mtimeit "import test1" "test1.primes(1000)"
1000 loops, best of 3: 528 usec per loop




More information about the Python-list mailing list