This is the mail archive of the gcc@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: Improving gcc scalability wrt _extra_ large C files


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


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