-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Processing dotnet/runtime#119890 (comment) command:
Command
-amd
using BenchmarkDotNet.Attributes;
public class Bench
{
public static string[] s_a = GenerateStrings();
static string[] GenerateStrings()
{
var a = new string[8];
for (int i = 0; i < a.Length; i++) a[i] = i.ToString();
return a;
}
public static int[] i_a = GenerateInts();
static int[] GenerateInts()
{
var a = new int[8];
for (int i = 0; i < a.Length; i++) a[i] = i;
return a;
}
[Benchmark]
public void ShuffleStrings() => Random.Shared.Shuffle(s_a);
[Benchmark]
public void ShuffleInts() => Random.Shared.Shuffle(i_a);
}
(EgorBot will reply in this issue)
Metadata
Metadata
Assignees
Labels
No labels