On Oct 17, 7:37 pm, Dave Angel <d...@davea.name> wrote: > And I'd wager all the improvement is in the inner loop, the dot() function.
Sorry -- red herring! Changing def mm1(a,b): return [[sum(x*y for x,y in zip(ra,rb)) for rb in zip(*b)] for ra in a] to def mm1(a,b): return [[sum([x*y for x,y in zip(ra,rb)]) for rb in zip(*b)] for ra in a] makes the speed diff vanish -- http://mail.python.org/mailman/listinfo/python-list