On Fri, Sep 10, 2010 at 11:36 AM, Hagen Fürstenau <[email protected]>wrote:
> Hi, > > I'm multiplying two 1000x1000 arrays with numpy.dot() and seeing > significant performance differences depending on the data. It seems to > take much longer on matrices with many zeros than on random ones. I > don't know much about optimized MM implementations, but is this normal > behavior for some reason? > > Multiplication by zero used to be faster than multiplication by random numbers. However, modern hardware and compilers may have changed that to pretty much a wash. More likely you are seeing cache issues due to data localization or even variations in the time given the thread running the multiplication. Chuck
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
