Well I have been wondering a bit about, how good/optimized the C++Compiler is.
If I write code like:
a = 23 +7;
Will the compiler optimize this code to:
a = 30;
Which is faster and always correct.
Also when you write C++ code like:
func()
{
UINT u1, u2, u3;
// Do something.
UINT u4, u5;
}
Is the compiler then allocating memory 2 places, or just in the begining of the function.
Because if the memory gets allocated one place, there´s a bigger chance, that it will fit into the CPUs cache, which is faster.
Hope somebody knows this, because I want fast code!
But don´t we all?