title: HashSet vs. List performance
body: <p>It's clear that a search performance of the generic <code>HashSet&lt;T&gt;</code> class is higher than of the generic <code>List&lt;T&gt;</code> class. Just compare the hash-based key with the linear approach in the <code>List&lt;T&gt;</code> class.</p>
  
  <p>However calculating a hash key may itself take some CPU cycles, so for a small amount of items the linear search can be a real alternative to the <code>HashSet&lt;T&gt;</code>.</p>
  
  <p>My question: where is the break-even?</p>
  
  <p>To simplify the scenario (and to be fair) let's assume that the <code>List&lt;T&gt;</code> class uses the element's <code>Equals()</code> method to identify an item.</p>