# Why is this simple function twice as slow as its Python version

**URL:** <https://discourse.julialang.org/t/why-is-this-simple-function-twice-as-slow-as-its-python-version/59004>\
**Category:** Performance\
**Tags:** question\
**Created:** [April 10, 2021, 6:58pm UTC](https://discourse.julialang.org/t/why-is-this-simple-function-twice-as-slow-as-its-python-version/59004 "2021-04-10T18:58:14Z")\
**Posts on this page:** 1\
**Showing post:** 73

<div class="post-metadata">

**Author:** ![Semi](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@Semi](https://discourse.julialang.org/u/Semi)\
**Post date:** [April 11, 2021, 10:06pm UTC](https://discourse.julialang.org/t/why-is-this-simple-function-twice-as-slow-as-its-python-version/59004/73 "2021-04-11T22:06:17Z")

</div>

After all I have learned here, my opinion on numpy has increased considerably.  
It seems that numpy interprets `tmp2[i*n:(i+1)*n,j*n:(j+1)*n] = t@tmp1` as  
`np.matmul(t,tmp1, out=tmp2[i*n:(i+1)*n,j*n:(j+1)*n])` without me having to think about it. That’s very nice.

---

_[View the full topic](https://discourse.julialang.org/t/why-is-this-simple-function-twice-as-slow-as-its-python-version/59004)._
