I did also benchmark against the XS module, and my module is quite slow in comparison (duh) unless the strings are equal, where my short circuit (return 0 if $word1 eq $word2) lays the smack down, in the parlance of our times.
for your information, here are my benchmark results:
joshs-Computer:~/leven josh$ perl levenshtein.pl foo fee
The distance between foo and fee is 2
Rate cpan mine cpanxs
cpan 80.6/s -- -16% -97%
mine 95.5/s 18% -- -97%
cpanxs 2844/s 3430% 2879% --
joshs-Computer:~/leven josh$ perl levenshtein.pl foo foo
The distance between foo and foo is 0
Rate cpan cpanxs mine
cpan 83.2/s -- -97% -98%
cpanxs 2849/s 3325% -- -31%
mine 4109/s 4840% 44% --
joshs-Computer:~/leven josh$ perl levenshtein.pl foo bar
The distance between foo and bar is 3
Rate cpan mine cpanxs
cpan 81.2/s -- -15% -97%
mine 95.4/s 18% -- -97%
cpanxs 2829/s 3385% 2865% --
oshs-Computer:~/leven josh$ perl levenshtein.pl 1234567890 0987654321
The distance between 1234567890 and 0987654321 is 10
Rate cpan mine cpanxs
cpan 9.35/s -- -24% -99%
mine 12.3/s 31% -- -99%
cpanxs 1782/s 18966% 14410% --