Someone has suggested to me that the built in C# Math.Sqrt function in .NET 4.0 caches its results, so that if I call Math.Sqrt(50) over and over again, it’s not actually doing a sqrt, but just pulling the answer from a cache. Can anyone verify or deny this claim? If it’s true then I have a bunch of needless caching going on in my code.
Someone has suggested to me that the built in C# Math.Sqrt function in .NET
Share
i don’t have .net 4 installed but you can vrify this easily by viewing the said method in reflector.
this is the only way that you’ll be sure to see what’s going on.