This is the mail archive of the
mailing list for the GCC project.
Re: Speed up some token processing
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 25 Oct 2004 12:30:27 -0700
- Subject: Re: Speed up some token processing
- References: <417CF7AC.email@example.com>
Nathan Sidwell <firstname.lastname@example.org> 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