Performance of string.IndexOf(string, StringComparison.OrdinalIgnoreCase) is worse than InvariantCultureIgnoreCase - by mspi1

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 699078 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 11/4/2011 7:08:51 AM
Access Restriction Public


The performance of string.IndexOf(string, StringComparison.OrdinalIgnoreCase) is about 10 times worse than string.IndexOf(string, StringComparison.InvariantCultureIgnoreCase) in a simple szenario.

According to documentation and best practice advice OrdinalIgnoreCase should be faster, e.g.
In .Net 2.0 OrdinalIgnoreCase was faster than InvariantCultureIgnoreCase, the behavior changed with .Net 4.0.

See also:
Sign in to post a comment.
Posted by Microsoft on 2/10/2012 at 11:43 AM
We were able to repro this issue. The issue has been resolved and the fix will be in the next release. Thank you for you feedback.
Posted by MS-Moderator07 [Feedback Moderator] on 11/6/2011 at 10:27 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by MS-Moderator07 on 11/6/2011 at 6:37 PM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly (