[cfe-commits] r67421 - in /cfe/trunk: include/clang/AST/Expr.h lib/AST/Expr.cpp lib/Sema/SemaInit.cpp

Chris Lattner clattner at apple.com
Sat Mar 21 01:34:48 PDT 2009


On Mar 20, 2009, at 4:58 PM, Douglas Gregor wrote:

> Author: dgregor
> Date: Fri Mar 20 18:58:33 2009
> New Revision: 67421
>
> URL: http://llvm.org/viewvc/llvm-project?rev=67421&view=rev
> Log:
> When building the structured initializer list, pre-allocate storage in
> its vectors based on the subobject type we're initializing and the
> (unstructured) initializer list. This eliminates some malloc thrashing
> when parsing initializers (from 117 vector reallocations down to 0
> when parsing Cocoa.h). We can't always pre-allocate the right amount
> of storage, since designated initializers can cause us to initialize
> in non-predictable patterns.

nice!




More information about the cfe-commits mailing list