On 2005-05-18, Luis P. Mendes <[EMAIL PROTECTED]> wrote: > I have a 1000 line python script that takes many hours to > finish. It is running with six inside 'for' loops.
[...] > How can I dramatically improve speed? In probably order of efficacy: 1) Use a better algorithm 2) Replace 'for' loops with vector operations or list comprehensions 3) Install more RAM 4) Install a faster disk drive 5) Use a faster CPU 6) Rent DVDs to watch while program is running. Before you do anything, you should profile your program to see where the time is being spent. -- Grant Edwards grante Yow! Hand me a pair of at leather pants and a CASIO visi.com keyboard -- I'm living for today! -- http://mail.python.org/mailman/listinfo/python-list