title: why IdentityHashMap uses linear probing for collision resolution
body: <p>As we know in java collections framework every class in <strong><code>Map</code></strong> uses Chaining for collision resolution but <strong><code>IdentityHashMap</code></strong> uses linear probing for the same.</p>
  
  <p>If you see the java docs, it has mentioned: </p>
  
  <blockquote>
    <p>For many JRE implementations and operation mixes, this class will
    yield better performance than HashMap (which uses chaining rather than
    linear-probing).</p>
  </blockquote>
  
  <p>My questions are:</p>
  
  <ul>
  <li><p>why the implementors have used <strong>liner probing</strong> only for <code>IdentityHashMap</code> instead of all the <code>Map</code> implementations if performance is better in <strong>linear probing</strong> </p></li>
  <li><p>Why there is a performance gain in <strong>linear Probing</strong> then <strong>chaining</strong>. </p></li>
  </ul>
  
  <p>Tanks.</p>