Vector3.Distance vs Pythagoras

This is not really an issue, but more of a technical question.
When working on my engine me and a buddy of mine long ago decided to test the processing speed of Vector3.Distance vs the Pythagoras theorem to find the distance between 2 vectors in a 2D field (ignoring the Z axis).

Surprisingly enough, Vector3.Distance is 3 times faster then using Pythagoras, even using 3 points instead of a 2.

I don’t know if this can even be answered in a simple way, but for curiosity sake, how is that possible?

1 Like

Maybe they’re using the Quake 3 method:

http://www.codemaestro.com/reviews/9

No, Vector3.Distance is just (a-b).magnitude. You don’t need any square root hacks these days, and in fact that would be counter-productive; square roots are a hardware operation and not so much slower than basic add/subtract operations.

–Eric