If you are only verifying if a word is valid, then couldn't you furthur break down your database by word lengths?
That way, you won't waste time comparing longer words with shorter ones.
A quick string length check would directly point you to the correct section of the database.
That way, you won't waste time comparing longer words with shorter ones.
A quick string length check would directly point you to the correct section of the database.