|go ahead... be a heretic|
Fast wordlist lookup for gameby jerrygarciuh (Curate)
|on Oct 29, 2002 at 22:41 UTC||Need Help??|
jerrygarciuh has asked for the
wisdom of the Perl Monks concerning the following question:
I am contemplating making a game which will involve using perl to verify the existance of words in a list of around 50K words. Currently I am assuming this will involve something like this: divide wordlist alphabetically and then use a regex to check for
/\b$word\b/ in the appropriate list. I am assuming that using mySQL to store lists will be faster than using text files but please correct me if that is in error.
Please advise me of your opinions of the fastest way to check for a word in such a large list.
"The man who grasps principles can successfully select his own methods.
The man who tries methods, ignoring principles, is sure to have trouble.
~ Ralph Waldo Emerson