On Mi, 2016-01-27 at 11:19 +0000, Nadav Horesh wrote: > Why the dot function/method is slower than @ on python 3.5.1? Tested > from the latest 1.11 maintenance branch. >
The explanation I think is that you do not have a blas optimization. In which case the fallback mode is probably faster in the @ case (since it has SSE2 optimization by using einsum, while np.dot does not do that). Btw. thanks for all the work getting this done Chuck! - Sebastian > > > np.__version__ > Out[39]: '1.11.0.dev0+Unknown' > > > %timeit A @ c > 10000 loops, best of 3: 185 µs per loop > > > %timeit A.dot(c) > 1000 loops, best of 3: 526 µs per loop > > > %timeit np.dot(A,c) > 1000 loops, best of 3: 527 µs per loop > > > A.dtype, A.shape, A.flags > Out[43]: > (dtype('float32'), (100, 100, 3), C_CONTIGUOUS : True > F_CONTIGUOUS : False > OWNDATA : True > WRITEABLE : True > ALIGNED : True > UPDATEIFCOPY : False) > > > c.dtype, c.shape, c.flags > Out[44]: > (dtype('float32'), (3, 3), C_CONTIGUOUS : True > F_CONTIGUOUS : False > OWNDATA : True > WRITEABLE : True > ALIGNED : True > UPDATEIFCOPY : False) > > > > > > From: NumPy-Discussion <numpy-discussion-boun...@scipy.org> on behalf > of Charles R Harris <charlesr.har...@gmail.com> > Sent: 26 January 2016 22:49 > To: numpy-discussion; SciPy Developers List; SciPy Users List > Subject: [Numpy-discussion] Numpy 1.11.0b1 is out > > > > > Hi All, > > I'm pleased to announce that Numpy 1.11.0b1 is now available on > sourceforge. This is a source release as the mingw32 toolchain is > broken. Please test it out and report any errors that you discover. > Hopefully we can do better with 1.11.0 than we did with 1.10.0 ;) > > Chuck > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > https://mail.scipy.org/mailman/listinfo/numpy-discussion >
signature.asc
Description: This is a digitally signed message part
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion