Ad
  • Custom User Avatar

    you don't need that specific algo, here, you can use something simpler (like, a lot simpler, not even what you use generally before that algo), that will finally be faster. Tho, that should work too, so I suppose you missed something in your heuristic.