How can I speed up a script that iterates over a large range (600 billion)?

Chris Angelico rosuav at gmail.com
Wed Jun 22 08:28:13 EDT 2011


On Wed, Jun 22, 2011 at 10:01 PM, Anny Mous <b1540457 at tyldd.com> wrote:
>            prime = table[i]
>            del table[i]
>

I don't fully understand your algorithm, but I think these two lines
can be rewritten as:
prime=table.pop(i)

Interesting algo. A recursive generator, not sure I've seen one of those before.

ChrisA



More information about the Python-list mailing list