2 ms·
If you use a trie with suffix-sharing in a suitably dense array, and alter your edit-distance algorithm to use it directly, you can easily get two to three orde
by ghusbands 5y ago
If you use a trie with suffix-sharing in a suitably dense array, and alter your edit-distance algorithm to use it directly, you can easily get two to three orders of magnitude faster, which could let you use this on a server for many clients.
(My old team used that technique, though not in Python, many years ago. In modern times, for web clients, I'd export the work to the browser - a full dictionary in the above form is something maybe 200KB, if I remember correctly.)