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: Neil Booth <neil at daikokuya dot co dot uk>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Jacques THOMAS <jthomas at cs dot purdue dot edu>, gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 13 Mar 2003 21:58:36 +0000
- Subject: Re: Improving gcc scalability wrt _extra_ large C files
- References: <3E70EEEC.8070402@cs.purdue.edu> <87vfynvu74.fsf@egil.codesourcery.com>
Zack Weinberg wrote:-
> Jacques THOMAS <jthomas at cs dot purdue dot edu> writes:
>
> 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).
Why don't we just have three bindings to each identifier, corresponding
to the 3 namespaces in the C standard (ignoring structure members):
tags, normal decls and labels. Then lookup is constant time. That's
what I've done in my c-parser. I could never understand why we make
name lookup so complicated (and slow) in the C front end.
Neil.