if len(str(a)) == len(str(r)) and isMult(a, r): faster if isMult is slow?

maestro notnorwegian at yahoo.se
Mon Aug 11 09:03:13 EDT 2008


If isMult is slow then:

if len(str(a)) == len(str(r)) and isMult(a, r):
                trues.append((a, r))

will be much faster than:

if isMult(a, r) and len(str(a)) == len(str(r)):
                trues.append((a, r))

right? seems obvious  but there is no magic going on that wouldn't
make this true right?



More information about the Python-list mailing list