title: List<T>.Contains() is very slow?
body: <p>Could anyone explain me why the generics <code>List.Contains()</code> function is so slow?  </p>
  
  <p>I have a <code>List&lt;long&gt;</code> with about a million numbers, and the code that is constantly checking if there's a specific number within these numbers.</p>
  
  <p>I tried doing the same thing using <code>Dictionary&lt;long, byte&gt;</code> and the <code>Dictionary.ContainsKey()</code> function, and it was about 10-20 times faster than with the List.</p>
  
  <p>Of course, I don't really want to use Dictionary for that purpose, because it wasn't meant to be used that way.</p>
  
  <p>So, the real question here is, is there any alternative to the <code>List&lt;T&gt;.Contains()</code>, but not as whacky as <code>Dictionary&lt;K,V&gt;.ContainsKey()</code> ?  </p>