Nozomi wrote:
+    for (i = 0; i < order * order; i++)

I might have written
     int n = order * order;
     for (i=0; i < n; i++)
to avoid repeating the multiplication every time around the loop,
even though multiplication is cheap nowadays, and -O1 will optimize
it out anyway.   Staying in the habit of avoiding 'expensive'
operations in loop limits might still be a good idea, since the
optimizer can't always save you.

Or is that considered ugly these days?

D3DXSHAdd() has the same code, which is where this came from, probably.


Reply via email to