Friday, March 20, 2009

.NET String comparison benchmarking

I was just going through http://msdn.microsoft.com/en-us/library/ms973919.aspx on string comparison. My finding is little different. If you are comparing strings with the combination of Equals() and ToUpper(), it is much faster than the Equals() and Enum StringComparison. I have profiled the code using Ants profiler and below is the screenshot.

No comments: