¡@

Home 

python Programming Glossary: rwh_primes1

Fastest way to list all primes below N in python

http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python

a number of implementations ambi_sieve_plain rwh_primes rwh_primes1 rwh_primes2 sieveOfAtkin sieveOfEratosthenes sundaram3 sieve_wheel_30.. William Hanks for primesfrom2to primesfrom3to rwh_primes rwh_primes1 and rwh_primes2. Of the plain Python methods tested with psyco.. the plain Python methods tested with psyco for n 1000000 rwh_primes1 was the fastest tested. Method ms rwh_primes1 43.0 sieveOfAtkin..

Improving pure Python prime sieve by recurrence formula

http://stackoverflow.com/questions/3285443/improving-pure-python-prime-sieve-by-recurrence-formula

than this special slicing technique. import cProfile def rwh_primes1 n # http stackoverflow.com questions 2068372 fastest way to.. print 'Profiling' cProfile.Profile.bias 4e 6 for test in rwh_primes1 primes cProfile.run test numprimes Profiling not so much difference.. string 1 module 1 0.185 0.185 0.185 0.185 myprimes.py 3 rwh_primes1 1 0.000 0.000 0.000 0.000 method 'disable' of '_lsprof.Profiler'..