[cfe-commits] r143100 - in /cfe/trunk: include/clang/Basic/ include/clang/Lex/ include/clang/Sema/ include/clang/Serialization/ lib/Basic/ lib/Lex/ lib/Sema/ lib/Serialization/ test/Modules/

John McCall rjmccall at apple.com
Thu Oct 27 02:45:49 PDT 2011


On Oct 27, 2011, at 2:33 AM, Douglas Gregor wrote:
> The results of this optimization are fairly dramatic. On a small
> application that brings in 14 non-trivial modules, this takes modules
> from being > 3x slower than a "perfect" PCH file down to 30% slower
> for a full rebuild. A partial rebuild (where the PCH file or modules
> can be re-used) is down to 7% slower. Making the PCH file just a
> little imperfect (e.g., adding two smallish modules used by a bunch of
> .m files that aren't in the PCH file) tips the scales in favor of the
> modules approach, with 24% faster partial rebuilds.


You've added an extra generally-not-taken branch to the lexing
of every single identifier-like token;  I wouldn't expect that to be
significant, but have you measured and verified that?

John.



More information about the cfe-commits mailing list