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