396 Views
This article will show how to increase the performance of a rather simple algorithm up to 80%, by showing how we can accept a loss in absolutely accuracy, and also taking advantage of how processors work.
Join in on a hand-picked round up of the best .NET articles every day.
Curated by our Moderators and Voted up by our Community. Free.
This article will show how to increase the performance of a rather simple algorithm up to 80%, by showing how we can accept a loss in absolutely accuracy, and also taking advantage of how processors work.
The only things I can think of with the CLR would also be one-time costs. Some APIs cache things underneath, but I don't think that applies to any of this simple code. Not sure about comparing to C and/or unmanaged/unsafe code--if you need unmanaged code, you need it, so let's make it the best it can be! :)
Anecdotally, I've found that .Net can be just as performant (at the levels I care about) as unmanaged--but you do have to care about different things.