This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [GCC 3.0] Bad regression, binary size
Phil Edwards <pedwards@disaster.jaj.com> writes:
> On Mon, Jul 09, 2001 at 02:54:21PM -0700, Justin Guyett wrote:
>> I dunno about the 1minute+ helloworld compile time someone just suggested,
>> but this is disturbing:
>> (v2.95) g++ -o hello hello.cc 0.15s user 0.03s system 96% cpu 0.186 total
>> (v3.0) g++ -o hello hello.cc 2.04s user 0.06s system 99% cpu 2.102 total
>>
>> if there's a 2 second loading overhead for g++v3, that's 2 seconds * (#
>> files) which can be quite a lot in large trees. Is this simply from
>> linking in the new libstdc++?
>
> Parsing the libstdc++ headers takes time, mostly because nearly all the
> code is in the headers. Once we have 'export' this should be
> better.
This isn't the trouble, it's the inlining.
We expand something from 300 insns to 15k insns, which itself takes
time, memory, and then the backend has to deal with a lot more.
Parsing took < 5 seconds on my example.
It was the rest of compilation that took > 30 seconds.
Without inlining, it took 5 seconds at -O3 total.
There must be a happy medium.
>
> Phil
>
> --
> Would I had phrases that are not known, utterances that are strange, in
> new language that has not been used, free from repetition, not an utterance
> which has grown stale, which men of old have spoken.
> - anonymous Egyptian scribe, c.1700 BC
--
"I put tape on the mirrors in my house so I don't accidentally
walk through into another dimension.
"-Steven Wright