Which is the fastest code among the following ones?
void foo1 (int & a)
{
a = 10;
}
or
void foo2 (void)
{
GLOBAL_VARIABLE.a = 10;
}
(where GLOBAL_VARIABLE is a global class element with field 'a') ?
Is there any difference in variable access/write times between local and global variables?