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

Richard Guenther rguenther@suse.de
Mon Jun 19 20:48:00 GMT 2006


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?

Richard.

--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs



More information about the Gcc-patches mailing list