# Why is BLAS dot product so much faster than Julia loop?

**URL:** <https://discourse.julialang.org/t/why-is-blas-dot-product-so-much-faster-than-julia-loop/44994>\
**Category:** Performance\
**Created:** [August 15, 2020, 2:53pm UTC](https://discourse.julialang.org/t/why-is-blas-dot-product-so-much-faster-than-julia-loop/44994 "2020-08-15T14:53:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [August 15, 2020, 3:03pm UTC](https://discourse.julialang.org/t/why-is-blas-dot-product-so-much-faster-than-julia-loop/44994/4 "2020-08-15T15:03:34Z")

</div>

I had a very similar question, with a lot of nice answers

[Simple Mat-Vec multiply (understanding performance, without the bugs)](https://discourse.julialang.org/t/simple-mat-vec-multiply-understanding-performance-without-the-bugs/44762)

my favorite by far was to use @tullio to avoid coding loops at all, just use Einstein tensor notation

```julia
return @tullio x[i]*y[i]

```

---

_[View the full topic](https://discourse.julialang.org/t/why-is-blas-dot-product-so-much-faster-than-julia-loop/44994)._
