# Python 3 @ matrix multiply performance

For clarity, consider using `@`

for matrix multiply instead of `.dot()`

in Python/Numpy.
The performance with either syntax is the same.

```
import numpy as np
X = np.random.random((5000,5000))
Y = np.random.random((5000,5000))
%timeit X @ Y
1 loop, best of 3: 1.65 s per loop
%timeit X.dot(Y)
1 loop, best of 3: 1.65 s per loop
%timeit np.dot(X,Y)
1 loop, best of 3: 1.65 s per loop
```

## Leave a Comment