Python nested loop speed issues -


i working on program test ideal angle-values construct something. i'm stuck @ nested-for-loop i'm going attach below. while idealy count each 'a' 9000, takes forever if values set below. there way speed nested loop? or can somehow assign more ressources python?

for a1 in  xrange(15, 91):     a2 in xrange(15, 91):         a3 in xrange(15, 91):             a4 in xrange(15, 91):                 a5 in xrange(15, 91):                     ite in xrange(1, 1000):                         ok = mathmatvec(a1, a2, a3, a4, a5, ite)                          if ok == 1:                                 v[0] = a1                                 v[1] = a2                                 .                                 . 

the itertools.product() function speed nested for-loops.

that said, running time dominated total number of calls mathmatvec().


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -