public int HashSetOptionB() { var hits = 0; foreach (var c in LookupB) { if (HashSetB.Contains(c)) { hits++; } } return(hits); }
public void GlobalSetup() { var r = new Random(); for (var x = 0; x < 4096; x++) { for (var y = 0; y < 4096; y++) { HashSetA.Add(new CoordinateA(x, y, 0)); HashSetB.Add(new CoordinateB(x, y, 0)); DictionaryA[new CoordinateA(x, y, 0)] = true; DictionaryB[new CoordinateB(x, y, 0)] = true; } } for (var i = 0; i < 10000; i++) { var x = r.Next(0, 4096); var y = r.Next(0, 4096); LookupA.Add(new CoordinateA(x, y, 0)); LookupB.Add(new CoordinateB(x, y, 0)); } }