title: Find objects with same properties in large List - performance slow
body: <p>I have a large <code>List&lt;MyClass&gt;</code> of objects, around 600000.
  <code>MyClass</code> has like 10 properties, let's say <code>property1</code>, <code>property2</code>, etc.. until <code>property10</code>.</p>
  
  <p>Out of that list, I want to get a List of <code>List&lt;MyClass&gt;</code> with objects having the same value for some of the properties. </p>
  
  <p>That means for example, objects where <code>property2</code>, <code>property4</code>, <code>property8</code> and <code>property10</code> are the same.</p>
  
  <p>What is the best way to do that? Currently I do a loop over my <code>List&lt;MyClass&gt;</code>, and within that loop I get all similar objects via <code>List&lt;MyClass&gt;.FindAll()</code>, dummy code:</p>
  
  <pre><code>forach(var item in myClassList)
  {
     if(!found.Contains(item))
     {
        var similarObjects = myClassList.FindAll(x =&gt; x.property2 == item.property2 &amp;&amp; x.property4 == item.property4 &amp;&amp; x.property8 == item.property8 &amp;&amp; x.property10 == item.property10);
  
        //adding the objects to the "already found" list
        foreach(var foundItem in similarOjbects)
        {
           found.Add(foundItem);
        }
  
       if(similarObjects.Count &gt; 1)
       {
          similarObjectsList.Add(similarObjects);
       }
     }
  }
  </code></pre>
  
  <p>But it takes ages, the <code>List.FindAll()</code> method is very slow. </p>
  
  <p>Is there a more efficient algorithm to do that?</p>