nested for loop

Delaney, Timothy C (Timothy) tdelaney at avaya.com
Mon May 10 21:11:13 EDT 2004


Wolfgang Buechel wrote:

> Is there a shorter (and probably, with respect to exec time, faster)
> way to write such a 4for loop?
> (I want to scan 3x3, 4x4 matrices too (;-)

In addition to the other suggestions, probably the simplest way to get
an immediate speedup (on x86) is to use psyco.

http://psyco.sourceforge.net/

Simply add:

    import psyco
    psyco.full()

to the top of your script. For more complex scripts, you may want to
consult the psyco docs for potentially better options.

Tim Delaney




More information about the Python-list mailing list