Yomguithereal / talisman

Straightforward fuzzy matching, information retrieval and NLP building blocks for JavaScript.
https://yomguithereal.github.io/talisman/
MIT License
704 stars 47 forks source link

Levenshtein: remove offset in the CODES array #146

Closed mvasilkov closed 6 years ago

mvasilkov commented 6 years ago

Always start indexing the CODES array from 0. This reduces the memory-leakiness when we have long common prefices.

Yomguithereal commented 6 years ago

Thanks @mvasilkov. What's more it reduces the number of operations to perform and enhance the perfs :).