# Speed up for-loop with multithreading

**URL:** <https://discourse.julialang.org/t/speed-up-for-loop-with-multithreading/79823>\
**Category:** Performance\
**Tags:** question, multithreading\
**Created:** [April 22, 2022, 9:11am UTC](https://discourse.julialang.org/t/speed-up-for-loop-with-multithreading/79823 "2022-04-22T09:11:46Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![goerch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerch/32/29122_2.png) [@goerch](https://discourse.julialang.org/u/goerch)\
**Post date:** [April 22, 2022, 1:24pm UTC](https://discourse.julialang.org/t/speed-up-for-loop-with-multithreading/79823/10 "2022-04-22T13:24:37Z")

</div>

Using

```julia
using Profile
Profile.clear()
a1 = init()
round_serial(a1)
@profile for i in 1:1000; round_serial(a1); end
Juno.profiler()

```

for my example I see in Juno/Atom something like this

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/f/afa7cad096d18598b2008badeae8a940c8eeb9e8.png)

where you can navigate from the profile pane to the source code. In the source code pane bigger bars mean larger part of the runtime. Read color indicates part of the program which allocate, yellow color indicates dynamic dispatch.

---

_[View the full topic](https://discourse.julialang.org/t/speed-up-for-loop-with-multithreading/79823)._
