Command
-intel -gv4 -profiler
```cs
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkSwitcher.FromAssembly(typeof(Bencha).Assembly).Run(args);
public class Bencha
{
static string[] Data =
Enumerable.Range(1000, 5000).Select(i => i.ToString()).ToArray();
[Benchmark]
public int Bench()
{
int sum = 0;
foreach (var item in Data)
if (item.StartsWith("111"))
sum++;
return sum;
}
[Benchmark]
public int Bench_IgnoreCase()
{
int sum = 0;
foreach (var item in Data)
if (item.StartsWith("111", StringComparison.OrdinalIgnoreCase))
sum++;
return sum;
}
}
```
Processing https://github.com/dotnet/runtime/pull/108818#issuecomment-2409035141 command:
Command
-intel -gv4 -profiler ```cs using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Running; BenchmarkSwitcher.FromAssembly(typeof(Bencha).Assembly).Run(args); public class Bencha { static string[] Data = Enumerable.Range(1000, 5000).Select(i => i.ToString()).ToArray(); [Benchmark] public int Bench() { int sum = 0; foreach (var item in Data) if (item.StartsWith("111")) sum++; return sum; } [Benchmark] public int Bench_IgnoreCase() { int sum = 0; foreach (var item in Data) if (item.StartsWith("111", StringComparison.OrdinalIgnoreCase)) sum++; return sum; } } ```(EgorBot will reply in this issue)