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: Bad compile time complexity for large files ??? (fwd)


On Nov 10, 2004, at 11:14 AM, Gabriel Dos Reis wrote:
Date: Tue, 9 Nov 2004 11:36:29 +0100 (CET)
From: Joris van der Hoeven <texmacs@math.u-psud.fr>
To: gcc@gcc.gnu.org
Subject: Bad compile time complexity for large files ???

When the number of routines increases, I noticed a far more than
linear time complexity for the compilation time.

If you are serious about this, abstract down the glue code, plot a graph of size v compile time, and see if it is bad (n^2 2^n...). If it is submit it as a bug report.


By abstract down, I mean, take the full code, and keep trimming out elements such that the compile times stay bad.

Another approach might be to submit a profile of the compiler as it compiles your code.

Be sure to use a top of the tree 4.0.0 compiler, as there have been a lot of work done recently to improve the compiler in this regard.

I'll give you an example of known slow things. Template instantiations are (were) done by a linear search, causing n^2 behavior. Not sure if this impacts you, as you abstracted out too much detail for me to tell.

Another possibility, try -O0.

A -ftime-report might also be useful in figuring out what is going wrong.

And most of all, be sure that you have an appropriate amount of memory for the task at hand. The garbage collector will run often, if you have a `small' machine.

And lastly, you'll want to get a yahoo or gmail account, if you can't manage to sort out your ISP problems. See http://gcc.gnu.org/lists.html for some details...


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