[llvm-dev] Memory utilization problems in profile reader

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 11 09:46:45 PST 2015


On Fri, Dec 11, 2015 at 8:58 AM, Xinliang David Li via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Isn't that ironic as 'Dense' should mean small and compact?  Can that be
> fixed?
>

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.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151211/793dacd1/attachment.html>


More information about the llvm-dev mailing list