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: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Mike Stump <mrs at apple dot com>
- Cc: Jacques THOMAS <jthomas at cs dot purdue dot edu>, gcc <gcc at gcc dot gnu dot org>
- Date: 14 Mar 2003 13:11:32 +0100
- Subject: Re: Improving gcc scalability wrt _extra_ large C files
- Organization: Integrable Solutions
- References: <D3E89DF8-559B-11D7-B09F-003065A77310@apple.com>
Mike Stump <mrs at apple dot com> writes:
| On Thursday, March 13, 2003, at 12:49 PM, Jacques THOMAS wrote:
| > As I said a few days ago, gcc is awfully slow when it comes to
| > compiling some very large generated C files (several hundred
| > thousands of different types and variables in the global lexical
| > scope).
|
| Gaby might be working in this area?
Absolutely right.
| Check and make sure that you don't slow down the common case any. The
| hash things can have high enough overhead, that you can wind up
| speeding up seriously large things, and 99.9% of the other code, is
| 30% slower... This would be a bad trade off. If you find the hash
| stuff is killing things, try smaller initial hash sizes (2-4
| elements), and if that doesn't work, try using a linked list, or a
| varray for < 20 (or whatever the cutover point it).
Here are how I'm proceeding:
* for namespace and class scope, I'm using a hash-table
* for local-scopes, I'm using a hash-table unless they are for-,
* while-, try-, catch- scopes.
I'm not (yet) finished with fixing all the places that needs
restructuring.
-- Gaby