Рет қаралды 3,727
Now more than half a decade old, but probably still the most popular of all my talks! I explain how the Python dictionary is implemented behind the scenes as a “hash table” that optimistically converts keys into integer array indexes and then has a back-up plan for the inevitable collisions between keys that then result. The talk features large, bright diagrams depicting how the hash table is initialized and constructed - diagrams that were build by a Python program I wrote that peeks inside the dictionary and draws what it sees in the raw data structure!