Further to this, references to lexical variables are compiled to an index at compile time. References to global (package) variables involve looking up the names at runtime, and that involves hashing and string equality checks on the full name of the variable.
While the cost of such things would not normally be significant, it is an area to consider at the point you find you need to optimise.
Hugo
In reply to Re^2: Does the size of a variable's name affect memory?
by hv
in thread Does the size of a variable's name affect memory?
by nmerriweather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |