12-28-2008, 07:59 AM
Global variables are not resource hogs. I wonder where you found that myth.
I just tested putting 100 000 global variables in my anti lag test bench. No noticable difference. The only difference was an increase in memory usage. With 100 000 global variables it is significant, with 10 000 it is not.
In practice its the design issues rather than performance issues which causes problems.
One could naturally imagine global variables being created in some dynamical way and then leak out in such a way that there keeps getting more global variables. But that is really an unlikely situation.
*hugs*
- Zeriab
I just tested putting 100 000 global variables in my anti lag test bench. No noticable difference. The only difference was an increase in memory usage. With 100 000 global variables it is significant, with 10 000 it is not.
In practice its the design issues rather than performance issues which causes problems.
One could naturally imagine global variables being created in some dynamical way and then leak out in such a way that there keeps getting more global variables. But that is really an unlikely situation.
*hugs*
- Zeriab