On 20 May 2005 15:35:10 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there a better way to code nested for loops as far as performance is > concerned. > > what better way can we write to improve the speed. > for example: > N=10000 > for i in range(N): > for j in range(N): > do_job1 > for j in range(N): > do_job2 >
What do you see when you profile the code? Premature Optimization is the root of all manner of evil and all that good stuff. -- http://mail.python.org/mailman/listinfo/python-list