I don\'t have experience with hash tables outside of arrays/dictionaries in dynamic languages, so I recently found out that internally they\'re implemented by making a hash
This is a near duplicate: Why do we use a hashcode in a hashtable instead of an index?
Long story short, you can check if a key is already stored VERY quickly, and equally rapidly store a new mapping. Otherwise you'd have to keep a sorted list of keys, which is much slower to store and retrieve mappings from.