# Questions about getting started with parallel computing

**URL:** https://discourse.julialang.org/t/questions-about-getting-started-with-parallel-computing/25341
**Category:** Julia at Scale
**Created:** [June 16, 2019, 6:09am UTC](https://discourse.julialang.org/t/questions-about-getting-started-with-parallel-computing/25341 "2019-06-16T06:09:47Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [June 16, 2019, 7:16am UTC](https://discourse.julialang.org/t/questions-about-getting-started-with-parallel-computing/25341/3 "2019-06-16T07:16:06Z")

</div>

Hi,  
the corresponding (multithreaded) recipe in Julia is to use `Threads.@threads` in front of your external loop:  
`Threads.@threads for i=0:8`

Under the conditions that the body of the loop is

- parallel (no dependencies)
- long enough to amortize the thread machinery
- not already memory bound

it should give you some speed-up 😉 (if it works with openMP it should work too)

As a usual advice, make sure that you sequential program is already well optimized (type stable, vectorized,…) before entering // business.

---

_[View the full topic](https://discourse.julialang.org/t/questions-about-getting-started-with-parallel-computing/25341)._
