static vs. global

Does static variables have any advantage with respect to performance, over global variables? If I could use either static or global, which one should I prefer?
Use static. Not because the performance is better, but because it's best to minimize the scope of your variables. Globals pollute namespace and make code unorganized and difficult to maintain.
agree with floor above!
a global var can be used in other source file by default
Thank you.
Topic archived. No new replies allowed.