This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Improving gcc scalability wrt _extra_ large C files
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Jacques THOMAS <jthomas at cs dot purdue dot edu>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 13 Mar 2003 13:21:35 -0800
- Subject: Re: Improving gcc scalability wrt _extra_ large C files
- References: <3E70EEEC.8070402@cs.purdue.edu>
Jacques THOMAS <jthomas at cs dot purdue dot edu> writes:
...
> For the moment, I am focused on lookup_tag, as I can modify the code
> generator in order to use less anonymous tags and minimize the
> importance of clear_anon_tags's behavior.
>
> My idea for improving lookup_tag is to use one hash table per binding
> level, with entries pointing to the tags of the binding level. To do
> that I would modify push_tag so that it does insert the symbol in the
> hash table at the same time that it does insert it in the linked
> list. lookup_tag could then use this hash table to do faster lookups.
This sounds like a sane approach. It's possible that you won't need
the linked list anymore if you make that change.
Another possible approach is to invert the lookup. Make the
IDENTIFIER_NODE point to its binding contour, and then have lookup_tag
check that that's the one we want. (handwaving wildly not having
actually looked at the code).
zw