title: Java ConcurrentHashMap is better than HashMap performance wise?
body: <p>I was just reading the book Clean Code and came across this statement:</p>
  
  <blockquote>
    <p>When Java was young Doug Lea wrote the seminal book[8] Concurrent
    Programming in Java. Along with the book he developed several
    thread-safe collection, which later became part of the JDK in the
    <code>java.util.concurrent</code> package. The collections in that package are safe
    for multithreaded situations and they perform well. <strong>In fact, the
    <code>ConcurrentHashMap</code> implementation performs better than HashMap in</strong>
    nearly all situations. It also allows for simultaneous concurrent
    reads and writes, and it has methods supporting common composite
    operations that are otherwise not thread safe. If Java 5 is the
    deployment environment, start with 
    <code>ConcurrentHashMap</code></p>
  </blockquote>
  
  <p>Note that in the above quote I used "[n]", where n is some number, to indicate the places where the author provided references, and as you can see he did not provide any reference for the bold part.</p>
  
  <p>Not that I don't believe this statement, but I would love to know the supporting evidences of this statement. So, does anyone know any resources that shows the performance statistics for both <code>ConcurrentHashMap</code> and <code>HashMap</code>? Or can anyone explain to me why ConcurrentHashMap is faster than HashMap? </p>
  
  <p>I probably will look into ConcurrentHashMap's implementation at work when I'm taking a break, but for now I would like to hear the answers from fellow SOers. </p>