This is the mail archive of the
mailing list for the GCC project.
Re: cache misses in gcc 3.3
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Andi Kleen <ak at muc dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 9 Feb 2003 23:13:15 +0000
- Subject: Re: cache misses in gcc 3.3
- References: <20030209221311.GA11277@averell>
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
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.