I was just wondering what happens when variable in function scope is always the same and don't change, for example
void test()
{
int x = 10;
}
I know that compiler stores informations about its name, size etc. but in this case will it cache its value aswell?
My thoughts was if that was a member function that was used like 60 or 140 times per sec. what impact on performance it would have, should it be moved as a member variable to improve performance?