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.
Then, a user can see a list of users with the best matching precentage to his own labels.
Right now I'm using the following naive algorithm:
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)
This naive algorithm runs at O(n^3) and is obviously extremely slow.
(I'm wondering how dating applications generate these matchings so quickly, they must have some really good algorithm).
Any better approaches?