The One Man MMO Project: Looking for a Fast Square Root
Last night I needed a square root function that would work on 64-bit unsigned integers. I have been using the standard library's sqrt, but my first thought was that an integer square root could be faster.
It turns out that the hardware-based floating point sqrt is 9.45x faster than the "fast" integer square root. If I add a call to static_cast to get the float value into a uint64, it is still 8.27x faster.
I'll keep the integer square root, but this post is going in the comments for it.
We were unable to retrieve our session cookie from your web browser. If pressing F5 once to reload this page does not get rid of this message, please read this to learn more.
You will not be able to post until you resolve this problem.
Copyright (C)2009-2015 onemanmmo.com. All Rights Reserved