[cfe-commits] r125756 - in /cfe/trunk: include/clang/AST/DeclBase.h lib/AST/DeclBase.cpp
Douglas Gregor
dgregor at apple.com
Fri Feb 18 07:36:17 PST 2011
On Feb 17, 2011, at 1:51 PM, Argyrios Kyrtzidis wrote:
> On Feb 17, 2011, at 10:14 AM, Douglas Gregor wrote:
>
>> Author: dgregor
>> Date: Thu Feb 17 12:14:32 2011
>> New Revision: 125756
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=125756&view=rev
>> Log:
>> Remove the last virtual member function from the Decl hierarchy,
>> reducing the size of all declarations by one pointer. For a 64-bit
>> Clang parsing Cocoa.h, this saves ~630k of memory (about 3.5% of
>> ASTContext's memory usage for this header).
>
> Is there any speed difference ?
I finally got around to measuring this, and unfortunately, there appears to be a performance loss of about 2% on Cocoa.h. Interesting that we got a win from devirtualizing the Stmt/Expr hierarchy, while we ended up with a loss here... probably because we hit the virtuals in the Decl hierarchy far more often in Sema.
Anyway, thanks for the prod. 2% speed loss for 3.5% memory improvement isn't worthwhile, IMO, so I'll see about backing out these changes.
- Doug
More information about the cfe-commits
mailing list