Guid default equality comparer
I have a dictionary which maps a Guid to Orders, it contains like 350000 orders
Im trying to optimize it by replacing the IEqualityComparer by a custom one.
Dictionary<Guid, Order> htPreOrders = new Dictionary<Guid, PreOrder>(350000);
would this be faster, or is that the same as the default equality comparer of Guid?
class Comp : IEqualityComparer<Guid>
public bool Equals(Guid x, Guid y)
return x == y;
public int GetHashCode(Guid obj)
Dictionary<Guid, Order> htPreOrders = new Dictionary<Guid, PreOrder>(350000, new Comp());