|laziness, impatience, and hubris|
Hamming Distance Between 2 Strings - Fast(est) Way?by monkfan (Curate)
|on Oct 14, 2005 at 14:30 UTC||Need Help??|
monkfan has asked for the
wisdom of the Perl Monks concerning the following question:
My most revered monks,
The subroutine below compute the number of mismatches between two strings (they are always equal) - usually called Hamming Distance.
However my code below is painfully slow. I am terribly in need of a super fast way to do this. In particular it has to process millions of string pairs.
Thus I turn to you my brother monks, for illumination in this matter.
Update: Benchmark. Thanks so much everybody.