cpplib 3.2: Fast number lexing

Zack Weinberg zack@codesourcery.com
Thu Mar 21 15:19:00 GMT 2002


On Thu, Mar 21, 2002 at 11:00:45PM +0000, Neil Booth wrote:
> This is a rip-off of Zack's patch of 6 months or so ago to parse
> identifiers quickly, but does it for numbers instead.  Basically,
> we have a fast routine that lexes numbers without embedded '\\',
> '?' or '$', and jump to a slower routine for the vanishingly small
> number of cases that do.

This looks good except for one thing:

> I moved a line of code so that GCC might be clever enough to merge the
> two calls to ht_lookup into one.

I think it would be better if you merged them in the source.  That
makes it obvious to a later reader that there isn't any difference
between the calls.

zw



More information about the Gcc-patches mailing list