title: What is the main performance gain from garbage collection?
body: <p>The llvm documentation says:</p>
  
  <blockquote>
    <p>In practice, however, the locality and performance benefits of using aggressive garbage collection techniques dominates any low-level losses.</p>
  </blockquote>
  
  <p>So what is it, exactly, that causes the performance gain when using garbage collection as opposed to manually managing memory? (besides the obvious decrease in code writing time) Is the benefit solely that performing heap compaction increases spatial locality and cache utilization? Or is there something else that helps more, like deleting everything at once?</p>