title: Algorithmic approach for matching list of labels with many other lists of labels
body: <p>I'm developing a matching app in android, in which each user enters free text about himself and  labels are being generated according to the words he wrote.</p>
  
  <p>Then, a user can see a list of users with the best matching precentage to his own labels.</p>
  
  <p>Right now I'm using the following naive algorithm:</p>
  
  <pre><code>1. For each label L of my labels 
  
     1.1 For each other user U in the app
  
         1.1.1 For each UL of that user's labels
  
            1.1.1.1 Check if L = UL (check if my current label equals that user's current label)
  </code></pre>
  
  <p>This naive algorithm runs at O(n^3) and is obviously extremely slow.</p>
  
  <p>(I'm wondering how dating applications generate these matchings so quickly, they must have some really good algorithm).</p>
  
  <p>Any better approaches?</p>