I've been learning about using a hashtable to efficiently check for items in a list without looping through the whole thing, but there's one thing that I don't get:
Why hashed keys?
It seems like:
var wordList = { 'aa' : ['aa'], 'aah' : ['aah'], 'ahhed' : ['aahed'] };
Would work just as well as:
var wordList = { '/* hashed value of aa*/' : ['aa'], '/* hashed value of aah*/' : ['aah'], '/* hashed value of aahed*/' : ['aahed'] };
What's the performance difference between looking up a hashed key and a simple name key?