[cfe-commits] r99912 - in /cfe/trunk: include/clang/AST/DeclBase.h include/clang/AST/DeclCXX.h include/clang/AST/DeclFriend.h include/clang/AST/DeclObjC.h include/clang/AST/DeclTemplate.h include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/ExprObjC.h include/clang/AST/Statistics.h include/clang/AST/Stmt.h include/clang/AST/StmtCXX.h include/clang/AST/StmtObjC.h include/clang/AST/Type.h lib/AST/DeclBase.cpp lib/AST/Expr.cpp lib/AST/Stmt.cpp lib/AST/Type.cpp
Douglas Gregor
dgregor at apple.com
Tue Mar 30 15:20:53 PDT 2010
On Mar 30, 2010, at 1:54 PM, Chris Lattner wrote:
>
> On Mar 30, 2010, at 1:41 PM, Douglas Gregor wrote:
>
>>>>
>>>> The statistics are only gathered when NDEBUG is not defined, since
>>>> they introduce potentially-expensive operations into very low-level
>>>> routines (isa).
>>>
>>> Interesting, are these checks (without the instrumentation) expensive and worth optimizing? What do these metrics tell us?
>>
>> Not as much as I'd hoped. Turning all of these checks into a constant "false" (in effect, partly specializing Clang for C code) only yielded a 2.8% performance improvement in -fsyntax-only on some sample C code, so these checks aren't all that expensive.
>
> Ok, is it worth keeping this code?
No.
- Doug
More information about the cfe-commits
mailing list