a few months ago I read something ABOUT a certain key word that I can not find.
The principle was that if a function depends solely on its parameters (not rand, or dependence on time or on a variable-volatile), the compiler could save the result in memory to optimize the next call.
Code:
int foo (int a)
(
return a + 2;
)
void main ()
(
foo (5);
foo (5);
)
foo here would be called once the 2nd time and the result is already in memory.
In my memory function was called 'pure' but looking on this key word I do not think 'pure virtual' ...
Bookmarks