# Advice for improving Monte-Carlo code

**URL:** https://discourse.julialang.org/t/advice-for-improving-monte-carlo-code/49782
**Category:** New to Julia
**Tags:** performance, parallel, monte-carlo
**Created:** [November 8, 2020, 10:41am UTC](https://discourse.julialang.org/t/advice-for-improving-monte-carlo-code/49782 "2020-11-08T10:41:14Z")
**Posts on this page:** 1
**Showing post:** 21

<div class="post-metadata">

### Author: ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)
#### Post date: [November 9, 2020, 8:12am UTC](https://discourse.julialang.org/t/advice-for-improving-monte-carlo-code/49782/21 "2020-11-09T08:12:56Z")

</div>

No, this is not exactly true, `FLoops.jl` is definitely not a deprecated package. Maybe the author of the package would come in and explain it better than I, but originally `FLoops.jl` and it’s brother [ThreadsX.jl](https://github.com/tkf/ThreadsX.jl) (you can read corresponding announcements [here](https://discourse.julialang.org/t/ann-parallel-for-loops-in-floops-jl-with-composable-and-extensible-fold-based-api/45390) and [here](https://discourse.julialang.org/t/ann-threadsx-jl-parallelized-base-functions/36666) ) are built on the basis of [Transducers.jl](https://github.com/JuliaFolds/Transducers.jl) and they are very flexible and powerful tools for writing high-level multithreading and parallel processing code.

In this particular problem, they do not shine, because this is a typical embarrassingly parallel problem and indeed `@Threads.threads` macro is enough to solve it. But they are useful in other scenarios, for example, parallel sorting, where simple `@threads` macro can’t be applied.

---

_[View the full topic](https://discourse.julialang.org/t/advice-for-improving-monte-carlo-code/49782)._
