Levenshtein algorithm revisited: 2.5 times faster
First of all one consideration: JavaScript is SLOW! Chrome, Safari, Opera, FireFox (Internet Explorer obviously is the only one 2 to 8 times slower!) It does not matter which tracemonkey or V8 you are using, JS is far away to be fast as C#, C++, C are! About Levenshtein If you would like to create a project like BJSpell with a reasonable suggestion , the levenshtein algorithm will trill at some point: it calculates the distance between 1 string to another one. It means that from the word "Gofy" to the word "Goofy", this algo will return 1 character to change replace, or add, before Gofy will become Goofy. Why Levenshtein To obtain a suggestion that makes sense, we could use some known algorithm to recognize at least words close to the mistyped one. So far, my suggestion in BJSpell was something truly rude and often useless, but as far as I know there is NO WAY to implement something more clever, using every possible best performances practice. How to speed up the ...