I have 60k items that need to be checked against a 20k lookup list. Is there a collection object (like List
, HashTable
) that provides an exceptionly fast Contains()
method? Or will I have to write my own? In otherwords, is the default Contains()
method just scan each item or does it use a better search algorithm.
foreach (Record item in LargeCollection)
{
if (LookupCollection.Contains(item.Key))
{
// Do something
}
}
Note. The lookup list is already sorted.