Speed up this code?

Miki miki.tebeka at gmail.com
Sun May 28 07:16:00 EDT 2006


Hello Martin,

You can use gmpy (http://gmpy.sourceforge.net/)

def primes():
    n = 2
    while 1:
        yield long(n)
        n = gmpy.next_prime(n)

HTH,
Miki
http://pythonwise.blogspot.com/




More information about the Python-list mailing list