<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 11, 2015 at 8:58 AM, Xinliang David Li via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Isn't that ironic as 'Dense' should mean small and compact?  Can that be fixed?</div></blockquote><div><br></div><div>I think, at the time it was written, the goal was to improve on std::map for small data types, so it is "dense" in the sense that it does not fragment the heap.</div><div><br></div><div>We also have this naming problem for SmallVector and TinyPtrVector. These data types both claim to use less memory, but they are optimized in different directions. TinyPtrVector is minimizes object size so that it can be used efficiently in DenseMap, while SmallVector increases the object footprint to avoid heap allocations in favor of stack allocations.</div></div></div></div>