r175906 - Replace some typically large vectors with SmallVector.

Jordan Rose jordan_rose at apple.com
Fri Feb 22 13:43:13 PST 2013


On Feb 22, 2013, at 13:42 , Jordan Rose <jordan_rose at apple.com> wrote:

> 
> On Feb 22, 2013, at 13:40 , Sean Silva <silvas at purdue.edu> wrote:
> 
>> On Fri, Feb 22, 2013 at 1:29 PM, Benjamin Kramer
>> <benny.kra at googlemail.com> wrote:
>>> This may seem counter-intuitive but the POD-like optimization helps when the
>>> vectors grow into multimegabyte buffers. SmallVector calls realloc which knows
>>> how to twiddle virtual memory bits and avoids large copies.
>> 
>> Is this optimization something that libc++ should be doing?
> 
> I haven't looked but I would guess that libc++ uses is_trivially_movable/is_trivially_copyable instead of is_pod, and all of our isPODLike cases should be trivially copyable if not trivially movable.

Also I type faster than I think, since trivially copyable implies trivially movable.

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130222/8989a946/attachment.html>


More information about the cfe-commits mailing list