-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Processing dotnet/runtime#111586 (comment) command:
Command
-arm
using System;
using System.Collections.Generic;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace BenchmarkGround
{
public class Bench
{
public IEnumerable<object[]> Args =>
[
["Foo", "FooBar"],
["Foo", "Bar"],
["A quick brown fox jumps over a lazy dog", "A quick brown fox jumps over a lazy hog"],
[new string([.. Enumerable.Repeat('a', 1000), '1']), new string([.. Enumerable.Repeat('a', 1000), '2'])],
];
[Benchmark]
[ArgumentsSource(nameof(Args))]
public int Compare(string left, string right) => string.Compare(left, right, StringComparison.Ordinal);
[Benchmark]
[ArgumentsSource(nameof(Args))]
public int CompareOridinal(string left, string right) => string.CompareOrdinal(left, right);
}
}
(EgorBot will reply in this issue)
Metadata
Metadata
Assignees
Labels
No labels