Parallelization way

Before that, check the performance tips of the manual.

First of all, put all the critical code in a function and do not use global variables.

https://docs.julialang.org/en/v1/manual/performance-tips/

2 Likes