I will explain my problem(excuse my bad English), I have a .NET exe in which every milliseconds of processing is very important. 

This program does lots of string comparison (most of it is `string1.IndexOf(string2, StringComparison.OrdinalIgnoreCase)`).

When i switch to framework 4, my program time is twice than before.

I searched for explanation and I found that the function `IndexOf(s, OrdinalIgnoreCase)` is much slower in framework 4 (I did test with a simple console application and in a loop the time was 30ms in 3.5 and 210ms in 4.0 ???). But the comparison in current culture is quicker in framework 4 than 3.5.

Here it's a sample of code I use :

```
int iMax = 100000;
String str  = "Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+fr;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1";
Stopwatch sw = new Stopwatch();
sw.Start();
StringComparison s = StringComparison.OrdinalIgnoreCase;
for(int i = 1;i<iMax;i++)
{
    str.IndexOf("windows", s);
}
sw.Stop();
Console.WriteLine(sw.ElapsedMilliseconds);
Console.Read();

```

My questions are :

1. Has anyone noticed the same problem?
2. Someone have an explanation on this change?
3. Is there a solution to bypass the problem?

Thanks.