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
Suggested Topics
Topic | Category | Replies | Views | Activity |
---|---|---|---|---|
SPTTRN1 - Straight Line Spiral Pattern (Act 1) | C and C++ | 0 | 14 | 6d |