This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][C++] Save memory and reallocations in name-lookup
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Aug 2012 06:43:57 -0500
- Subject: Re: [PATCH][C++] Save memory and reallocations in name-lookup
- References: <alpine.LNX.2.00.1208171312031.28649@zhemvz.fhfr.qr>
On Fri, Aug 17, 2012 at 6:17 AM, Richard Guenther <rguenther@suse.de> wrote:
> which means only 19516 reallocations and 350kb wasted memory. The
> compile-time effects are neutral (name-lookup is 1.0+-0.05s on
> the reduced testcase) - a slightly different version which omitted
> the temporary vector but walked things twice was consistently slower
> (about 1.2s).
Funny; I found something similar 10 years ago :-/
> It seems we can end up with duplicates in the
> names chain of store_bindings (not sure if that is intended).
>
the chain is supposed to implement a stack, not a set.
-- Gaby