For-loop in function is faster than global scope?

https://docs.julialang.org/en/v1/manual/performance-tips/#Avoid-global-variables

5 Likes