- hash all your dictionary entries through a Levenshtein-locality-sensitive hash function [2] with a well-chosen hash size. Any two words within a Levenshtein distance D of each other will have the same hash (you pick D).
- store the hashes into an efficient DB for quick lookup. Each hash will map to one or several (levenshtein-similar) dictionary entries.
- when presented with a new input, compute its hash, retrieve the entry for the hash in your DB (if it exists).
- finish by sorting the retrieved dictionary entries by Levenshtein distance to your input... you just recovered all dictionary entries closer than distance D to your input (approximately).
Pretty much unbeatable, and works over spaces that have hundreds of millions of dictionary entries.
[1] https://en.wikipedia.org/wiki/Nearest_neighbor_search#Approx...
[2] Can't find one? Build your own by computing the pairwise distance matrix of your entries, then reducing this matrix through PCA to an appropriate number of components (the length of your hash). The coordinates of each entry in this new space is the entry's hash.