title: Does numpy use spatial locality in memory while doing matrix multiplication?
body: <p>While multiplying large matrices (say A and B, A.dot(B)), does numpy use spatial locality by computing the transpose of the B and using row wise multiplication, or does it access the elements of B in column-wise fashion which would lead to many cache misses. I have observed that memory bandwidth is becoming a bottleneck when I run multiple instances of the same program. For example, if I run 4 independent instances of a program which does matrix multiplication (for large matrices) on a 20 core machine, I only see a 2.3 times speedup.</p>