in reply to Tell whether two strings differ at only one position

The speed race for the most generic case seems to be over. But looking at the real data and considering hit probabilities should provide the largest speed up. Assuming the language dictionary comparison, hits are quite unlikely. Most comparisons can be optimized away completely.

Bloom::Filter (or an Bit::Vector based version of it) can tell you very quickly if there is a hit in the database, but can not tell you where it matched. It produces some false positives. You have to weight the creation of the hash table against getting a nearly linear scalability.

Playing some tricks with an 'any' char seems to be neccessary. 'ab#d' would be an extended version of lowercasing.

  • Comment on Re: Tell whether two strings differ at only one position