Speed up some token processing
Nathan Sidwell
nathan@codesourcery.com
Mon Oct 25 14:39:00 GMT 2004
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?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: parser-4.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041025/0da50567/attachment.ksh>
More information about the Gcc-patches
mailing list