Possible Duplicate:
Should I use multiplication or division?
Poking around in some (C++) 3D library I often see code like this:
float fInvLength = 1.0f / fLength;
rkAxis.x = x * fInvLength;
rkAxis.y = y * fInvLength;
rkAxis.z = z * fInvLength;
Is this really faster than this code:
rkAxis.x = x / fLength;
rkAxis.y = y / fLength;
rkAxis.z = z / fLength;
I'm primarily interested in C#/.NET performance but I don't mind some info about C++ as well.