using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
using System.Buffers;
BenchmarkRunner.Run<Test>(args: args);
[DisassemblyDiagnoser(10)]
[ShortRunJob(RuntimeMoniker.Net80)]
[ShortRunJob(RuntimeMoniker.Net90)]
public class Test
{
private static readonly SearchValues<char> s_values = SearchValues.Create("aeiouAEIOU");
private static readonly string s_text = new('\n', 1000);
[Benchmark]
public void ContainsAny() => s_text.AsSpan().ContainsAny(s_values);
}
Running the following benchmark
will print something like
(.NET 8.0.8 and 9.0 RC 1)
where the disassembly for .NET 9 is just the top-most benchmarked method, calling into something, but the callee isn't included.
I'm sure this used to work earlier in .NET 9, so it's possible a change in .NET broke this.