Complete word-database for Java-App to check if a word is actually a legit word, is SQL appropriate in this case? -


i going write game in have have check if string of letters word or not. question how fastest least computation-able power possible (for instance old smart-phone). if possible not start-up time make quick , responsive app.

i once did look-up first reading in word-file words appropriate sized hash-map of around 650,000 words*. (* might more, not sure if exhausted list yet).

would sql database appropriate here? thinking of buying book can learn , implement one. have no idea how create hash-map, save later , load one. of hacker solution or technique used more often? make sense me learn sql or saving hashmap , later restoring it.

a database sql appropriate if plan query every time need check word, not fastest solution; querying every single word slows down response time should use less memory if words number high (you must measure memory consumed db vs memory consumed map). checking if word inside map not computationally expensive, must calculate hash , iterate on array of items same hash.

personally choose map if memory requirements of keeping words in memory can satisfied. can store dictionary plain text file (one line -> 1 word) , read in background thread when application starts.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -