Im not really sure how to formulate this question, so ill just try to picture it this way... Will this:
#include <iostream>
int main()
{
int i;
while (true)
for (i = 0; i < 100; i++)
std::cout << i << '\n';
return 0;
}
run faster than this?:
#include <iostream>
int main()
{
while (true)
for (int i = 0; i < 100; i++)
std::cout << i << '\n';
return 0;
}
Maybe the question can be formed this way: Does declaring a variable (without initializing it) cost me resources?