title: Memory overhead of Java HashMap compared to ArrayList
body: <p>I am wondering what is the memory overhead of java HashMap compared to ArrayList?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I would like to improve the speed for searching for specific values of a big pack (6 Millions+) of identical objects.</p>
  
  <p>Thus, I am thinking about using one or several HashMap instead of using ArrayList. But I am wondering what is the overhead of HashMap.</p>
  
  <p>As far as i understand, the key is not stored, only the hash of the key, so it should be something like <em>size of the hash of the object + one pointer</em>.</p>
  
  <p>But what hash function is used? Is it <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()" rel="noreferrer">the one offered by Object</a> or another one?</p>