Words to numbers faster lookup
You're doing something wrong. I can query a 100K word dict in nanoseconds

word_list = open('/usr/share/dict/words').read().split()
len(word_list)

&gt; 99171

word_dict = {word: hash(word) for word in word_list}
%timeit word_dict['blazing']

&gt; 10000000 loops, best of 3: 33.8 ns per loop