Your best bet in that case is to store the dictionary in a Trie or DAWG structure that can be mmapped directly from disk.