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

Terry Reedy tjreedy at udel.edu
Tue Jun 21 19:30:01 EDT 2011


On 6/21/2011 3:48 PM, John Salerno wrote:

> Absolutely not! Each problem has been designed according to a "one-
> minute rule", which means that although it may take several hours to
> design a successful algorithm with more difficult problems, an
> efficient implementation will allow a solution to be obtained on a
> modestly powered computer in less than one minute."

That statement is for C, not Python. Python is efficient with human 
time, but not machine time. If something really takes a minute in C, 
allow yourself at least 10 minutes or even more with plain CPython.

-- 
Terry Jan Reedy




More information about the Python-list mailing list