On Thu, 15 Sep 2016 15:37:42 +0100 Paul Stead wrote: > > https://github.com/fmbla/spamassassin-levenshtein > > An implementation I made for SA - feedback welcome
A couple of things 1. Instead of having a with/without tld option you could compute the distance without the tld and then add 1 if the tlds differ. 2. The distance between two strings is at least the difference in their length, so you can skip almost all the calls to distance().