# Innefficient paralellization? Need some help optimizing a simple dot product

**URL:** <https://discourse.julialang.org/t/innefficient-paralellization-need-some-help-optimizing-a-simple-dot-product/9723>\
**Category:** Performance\
**Tags:** question, parallel\
**Created:** [March 14, 2018, 10:34pm UTC](https://discourse.julialang.org/t/innefficient-paralellization-need-some-help-optimizing-a-simple-dot-product/9723 "2018-03-14T22:34:20Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [March 15, 2018, 7:20pm UTC](https://discourse.julialang.org/t/innefficient-paralellization-need-some-help-optimizing-a-simple-dot-product/9723/20 "2018-03-15T19:20:39Z")

</div>

> [@stabbles](#):
>
> BLAS does not benefit from a threaded inner product

Oh wow, that’s surprising to me. Some results on my machine (0.6.2, Linux):

```julia
Julia (no threads): Trial(35.786 μs)

BLAS (1 threads): Trial(35.793 μs)
Julia (1 threads): Trial(36.234 μs)

BLAS (2 threads): Trial(35.731 μs)
Julia (2 threads): Trial(19.571 μs)

BLAS (4 threads): Trial(35.775 μs)
Julia (4 threads): Trial(10.698 μs)

BLAS (8 threads): Trial(35.772 μs)
Julia (8 threads): Trial(5.150 μs)

BLAS (16 threads): Trial(35.782 μs)
Julia (16 threads): Trial(4.514 μs)

BLAS (32 threads): Trial(35.760 μs)
Julia (32 threads): Trial(4.050 μs)

BLAS (64 threads): Trial(35.819 μs)
Julia (64 threads): Trial(4.122 μs)

```

Edit: added more results.

---

_[View the full topic](https://discourse.julialang.org/t/innefficient-paralellization-need-some-help-optimizing-a-simple-dot-product/9723)._
