As you can see, this requires that you perform a square root. Square roots should be avoided
like the plague if you want to write fast code. Only perform a Square Root if you really need
to.

Ways to avoid Square Roots:

If you don't need a very accurate distance, you can use a lookup table to calculate it.

If, for example, you are performing collision detection between spheres, and all you want
to know is whether or not two have collided, then you do not need to use a square root. Simply
change the piece of code from: