Is there any use of using a global variable declared static ?
I have heard static variables are faster than global variables. But why is that so ?
Local variables are stored in stack. Global on heaps. Heard static on data segments.
So is the performance scale like this :
stack access time > heap access time > data segment access