title: How Python's compact dict lookup is performed, with int value inside the indicies?
body: <p>I'm diggin in the <code>dict</code> structure in Python, and I'm trying to understand the implementation of <strong>compact dict with faster iteration</strong> explained here <a href="https://mail.python.org/pipermail/python-dev/2012-December/123028.html" rel="nofollow noreferrer">[Python-Dev] More compact dictionaries with faster iteration by Raymond Hettinger</a></p>
  
  <p>In this message, Raymond shows how the current dict implementation is and how it can be more memory efficient. He depict dict structure like this:</p>
  
  <pre><code>d = {'timmy': 'red', 'barry': 'green', 'guido': 'blue'}
  </code></pre>
  
  <blockquote>
    <p>is currently stored as:</p>
  </blockquote>
  
  <pre><code>entries = [['--', '--', '--'],
             [-8522787127447073495, 'barry', 'green'],
             ['--', '--', '--'],
             ['--', '--', '--'],
             ['--', '--', '--'],
             [-9092791511155847987, 'timmy', 'red'],
             ['--', '--', '--'],
             [-6480567542315338377, 'guido', 'blue']]
  </code></pre>
  
  <blockquote>
    <p>Instead, the data should be organized as follows:</p>
  </blockquote>
  
  <pre><code>indices =  [None, 1, None, None, None, 0, None, 2]
  entries =  [[-9092791511155847987, 'timmy', 'red'],
              [-8522787127447073495, 'barry', 'green'],
              [-6480567542315338377, 'guido', 'blue']]
  </code></pre>
  
  <p>My question is <strong>how does the new dict implementation performs lookup,</strong> if the indices data is numerical 0, 1, 2, as the items were entered?
  Is it just for clarity, and the actual value is different (eg, hash value of the key) ?</p>
  
  <p>Some references I already looked <a href="https://stackoverflow.com/questions/39980323/dictionaries-are-ordered-in-python-3-6">Dictionaries are ordered in Python 3.6+</a></p>