[PATCH] Reduce GC overhead of the C++ lexer buffer

Steven Bosscher stevenb.gcc@gmail.com
Mon Jun 19 20:56:00 GMT 2006


On 6/19/06, Richard Guenther <rguenther@suse.de> wrote:
> On Mon, 19 Jun 2006, Steven Bosscher wrote:
>
> > On Monday 19 June 2006 14:05, Richard Guenther wrote:
> > > At the moment we have
> > >
> > > cp/parser.c:292 (cp_lexer_new_main)  0: 0.0%  82369152:33.3%  0: 0.0%
> > > 15784576:37.2%  7
> > >
> > > which is due to the fact that the initial lexer buffer size is no where
> > > near a power-of-two value and we keep gc-reallocating the vector, doubling
> > > its size.
> > >
> > > With the following patch, this overhead is removed nearly completely
> > >
> > > cp/parser.c:266 (cp_lexer_new_main)                       0: 0.0%
> > > 36: 0.0%          0: 0.0%          4: 0.0%          1
> > >
> > > Comments?
> >
> > I wonder if this will result in significantly larger PCHs... ?
>
> How so?

I thought you were making the token buffer much larger.

But you're not.  So never mind.  :-)

Gr.
Steven



More information about the Gcc-patches mailing list