I have to store ~50,000 English words in memory and I'd like to know what would be the best data structure in term of memory footprint (and loading speed). Would it be a Trie? How would I serialize it into a file? Is there anything better than that?
Essentially, once the ~50,000 words are loaded into memory, I simply need to check if the word exists or not.