I have the following piece of simple code that is potentially going to be executed many hundreds of millions of times;
for (int i = 0; i < 8; i++)
if (((p[i].X >= x) && (p[i].X <= x + d))
&&((p[i].Y >= y) && (p[i].Y <= y + d))
&&((p[i].Z >= z) && (p[i].Z <= z + d)))
return 1;
Will the optimizer in the Visual C++ 2010 compiler unroll this loop for me, or am I better off to do it manually? I've looked at other similar questions but don't see any specific results. I