Some dictionary internals in CPython (and PyPy)
3r3407. 3r3-31. The internal structure of dictionaries in Python is not limited to bucket and closed hashing alone. This is an amazing world of shared keys, caching hashes, DKIX_DUMMY and quick comparisons that can be made even faster (at the cost of a bug with an approximate probability of 2 ^ -64).
3r3407. If you don’t know the number of elements in the newly created dictionary, how much memory is spent on each element, why now (CPython 3.6 and later) the dictionary is implemented with two arrays and how does this relate to maintaining the insertion order, or simply didn’t watch the Raymond Hettinger presentation “Modern Python Dictionaries A confluence of a great dozen great ideas. ” Then welcome.
It may be interesting