[cfe-commits] r125756 - in /cfe/trunk: include/clang/AST/DeclBase.h lib/AST/DeclBase.cpp

Douglas Gregor dgregor at apple.com
Fri Feb 18 09:08:42 PST 2011


On Feb 18, 2011, at 9:02 AM, Chris Lattner wrote:

> 
> On Feb 18, 2011, at 7:36 AM, Douglas Gregor wrote:
> 
>>> 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.
> 
> Do you know what is causing the performance regression?


I did some rough testing yesterday, and the main culprits seemed to be Decl::isOutOfLine(), DeclaratorDecl::getInnerLocStart() and TagDecl::getInnerLocStart(). However, there's a *lot* going on on trunk now, so I'm going to do some more fine-grained testing with just the devirtualization changes in the hope that I can salvage this memory optimization.

	- Doug



More information about the cfe-commits mailing list