This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Speed up some token processing


Nathan Sidwell <nathan@codesourcery.com> writes:

> This patch speeds up token processing by moving some duplicated code
> into a single switch statement.  It shows a surprisingly good speedup
> of the Qt library of 1.5%.
>
> Moving the TV_CPP timing to surround all of c_lex_with_flags will affect
> the timing report slightly, but I don't think it worth worrying over much
> about that.
>
> There were a number of exit paths from c_lex_with_flags that did not go
> through the no_more_pch check.  I suspect that if they occured at the
> start of translation, they would be a parse error, but this fixes it up.
>
> booted & tested on i686-pc-linux-gnu, ok?

The major concern I have is that TV_LEX and TV_CPP are now not
usefully distinguishable.  Perhaps we should remove one of them?  Or
both, since timevar operations have substantial overhead and so the
numbers we get from them are probably not meaningful when they're
pushed and popped on every token?

Also, could you talk a little about the rationale for the testsuite
changes?

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]