This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][C++] Save memory and reallocations in name-lookup


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]