Hi,
I have something like this
register unsigned int a, b, c;
int n;
for (n = 0; n < 10; ++n){
c = a + b
b = a
a = c
array[n] = c;
}
what it does, it doesn't matter. The code runs quickly the way it is now, slower if the register keyword is removed. However, when I add in register before int n, it actually runs slower than now, but faster than if no registers is used.
Can someone explain this to me? Thanks.