This is the mail archive of the gcc@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: cache misses in gcc 3.3


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.


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