-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Processing dotnet/runtime#122959 (comment) command:
Command
-amd -intel -arm
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System.Text.RegularExpressions;
BenchmarkSwitcher.FromAssembly(typeof(Benchmarks).Assembly).Run(args);
[MemoryDiagnoser(false)]
public partial class Benchmarks
{
private Regex _regex;
private string _haystack;
[GlobalSetup]
public async Task Setup()
{
using HttpClient client = new();
_regex = new Regex(await client.GetStringAsync("https://raw.githubusercontent.com/BurntSushi/rebar/refs/heads/master/benchmarks/regexes/wild/date.txt"), RegexOptions.Compiled);
_haystack = await client.GetStringAsync("https://github.com/BurntSushi/rebar/blob/master/benchmarks/haystacks/rust-src-tools-3b0d4813.txt");
}
[Benchmark]
public int Count() => _regex.Count(_haystack);
}
(EgorBot will reply in this issue)
Metadata
Metadata
Assignees
Labels
No labels