I know that static definition (ex: static int toto;) is used in order that function or variable will be seen only in the local file and not in the whole source code.
I m wondering if the static definition has impact:
- on performence on binary program execution ?
- on optimization of memory size of code memory?
- on optimization of memory size of data memory?
static is just the way to make the variable or function visible inside a current translation unit (current source file).It means the
global staticvariables are havinginternal linkage.So of course building any executable in which every indentifier has internal linkage is litter faster because no external symbols or less number of external symbols have to be resolved by linker.
But It can not be said surely without knowing the platform , compiler and it’s version,So it’s just a general explanation