cache misses in gcc 3.3

Neil Booth neil@daikokuya.co.uk
Sun Feb 9 23:13:00 GMT 2003


Andi Kleen wrote:-

> One particularly interesting case for this I investigated nearer is the
> bison parser (bison.simple).  In my test it took >10% and much longer
> than lexical analysis, which is quite slow (on fast compilers lexical
> analysis is slower than the parser). It shows quite a bit dcache misses
> too.

Indeed.  Have you considered how many state transitions are necessary
just to parse declspecs in the C front end?  Even that's a compromise,
as is noted in comments in c-parse.in IIRC.

I'm hoping to get my top-down parser as fast as preprocessing, but that
may be optimistic.  Other advantages of a top-down parser, in my opinion
from experience so far, are better diagnostics and better error recovery.
This could to some extent be improved in c-parse.in, but only at the
cost of a ballooning in the number of states.

Neil.



More information about the Gcc mailing list