title: Java collections faster than c++ containers?
body: <p>I was reading the comments on this <a href="https://stackoverflow.com/questions/2163411/why-did-java-have-the-reputation-of-being-slow/2163570#2163570">answer</a> and I saw this quote.  </p>
  
  <blockquote>
    <p>Object instantiation and object-oriented features are blazing fast to use (faster than C++ in many cases) because they're designed in from the beginning. and Collections are fast. Standard Java beats standard C/C++ in this area, even for most optimized C code.  </p>
  </blockquote>
  
  <p>One user (with really high rep I might add) boldly defended this claim, stating that </p>
  
  <ol>
  <li><p>heap allocation in java is better than C++'s  </p></li>
  <li><p>and added this statement defending the collections in java  </p>
  
  <blockquote>
    <p>And Java collections are fast compared to C++ collections due largely to the different memory subsystem.  </p>
  </blockquote></li>
  </ol>
  
  <p>So my question is can any of this really be true, and if so why is java's heap allocation so much faster.</p>