[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
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...
More information about the llvm-dev