if i have a 2 different functions f1() and f2(), f1 has an optimised variable (using register) and f2 has 500 optimised variables, is it true to say that
A) calling f2() then f1() may mean that the optimised variable in f1 may not be optimised because f2 may had exhausted all possible optimisations possible
B) calling f1() then f2() will mean that the optimised variable in f1 is surely optimised (because there is only one)
What the register keyword actually does, in case OP doesn't know, is hint to the compiler to try and store a variable in a register where possible. I don't see the point in using it, though. The compiler decides where to put variables; it can use them entirely through registers if it wants to anyway. The compiler is usually better at optimizations like that...