I guess I’m missing some subtle issues when it comes to global variables. The first tip in the Performance Tips section of the manual is pretty clear: avoid global variables. It does say
Variables should be local, or passed as arguments to functions, whenever possible.
but that leaves open whether passing a global variable to a function could cause performance issues. But I guess you imply that that isn’t the case (or at least not here).
I don’t really see that. It’s clear that Julia is different from the average dynamic language, like Python, and that writing code in a style that usually fits dynamic languages can cause all sorts of (performance) issues in Julia. I also think approaching Julia as Python-but-with-a-compiler-bolted-on is one of the main sources of misconception and failed promises.