-
Couldn't load subscription status.
- Fork 1
Open
Description
Processing dotnet/runtime#114792 (comment) command:
Command
-intel -amd
using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
public class Bench
{
const int Count = 40960;
private static readonly Dictionary<int, int> ints = new ();
static Bench () {
for (int i = 0; i < Count; i++)
ints[i] = i;
}
[Benchmark]
public bool FindPresent() {
for (int i = 0; i < Count; i++)
if (!ints.TryGetValue(i, out _))
return false;
return true;
}
[Benchmark]
public bool FindMissing() {
for (int i = 0; i < Count; i++)
if (ints.TryGetValue(i + Count, out _))
return false;
return true;
}
}(EgorBot will reply in this issue)
Metadata
Metadata
Assignees
Labels
No labels