This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New C++ Parser
- To: Robert Dewar <dewar at gnat dot com>
- Subject: Re: New C++ Parser
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Sun, 22 Oct 2000 18:43:53 -0400
- Cc: mark at codesourcery dot com, per at bothner dot com, gcc at gcc dot gnu dot org
- References: <20001022002625.7D9E434D82@nile.gnat.com>
On Sat, Oct 21, 2000 at 08:26:25PM -0400, Robert Dewar wrote:
>
> << - Might be faster.
> >>
>
> Almost certainly faster, but the parser should take a very small fraction
> of the compile time anyway, so this is not really a factor.
You have the funkiest style of quoting... anyhow.
The parser "should" take a small fraction of the compile time, but it
usually doesn't. When I've cared enough to look, most of my experiences
are that the parser takes the majority of the compile time, which is one
reason why PCH gets so much attention.
Take a peek at the gcc-bugs archives of late August for a thread with the
subject of "Example program takes 2000 times as long to compile under C++
as C" for some good discussion on this point. The original post contained
the note that
As you can see, the compile takes 0.09 seconds with C front end and
209.43 seconds with the C++ front end. Virtually all of the time is
spent in either the parser (73%) and integration (27%) portions of
the compiler.
and some great numbers were thrown around in the followups. Very
educational.
Luck++;
Phil
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.