mozilla-b2g/gaia — pull request #4751 by ckerschb (2012-09-14 21:54:24+00:00)
Title: code and minor speed optimization for predictive texting

a.) Maintaining the top three candidates can be done without calling 'sort' on the array. However, we do have to iterate the whole array to find out if the candidate is already listed. Thanks David for pointing that out.

b.) If the input word is only one character in length, we don't have to call EditDistance, Omission, Deletion, Transposition, we rather want immediate response from the engine.