delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/10/13:45:06

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Huge differences in compilation time between gcc/gpp
Date: 10 Apr 2002 17:34:46 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 27
Message-ID: <a91t3m$hb$1@nets3.rz.RWTH-Aachen.DE>
References: <MPG DOT 171e94b2eddf849f989686 AT news DOT icm DOT edu DOT pl>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1018460086 555 137.226.32.75 (10 Apr 2002 17:34:46 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 10 Apr 2002 17:34:46 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Tomasz Dobek <dobsiens AT o2 DOT pl> wrote:

> Why program, which does print 'hello world', compiles in C compiler only 
> a few seconds, but in C++ a few minutes (!). 

It definitely shouldn't do that if your machine is decently equipped
with RAM by today's standards and the harddisk is properly cached.

C++ compiles are a lot slower than C, yes, and classes with lots of
inlined code add to that time considerably.  But everything beyond 10
seconds for hello.cpp is a sign for serious misconfiguration or a
seriously outdated PC, I'd say.

> I guess that the problem is a compilation of iostream, which is done 
> everytime I compile sth in C++. Can be something done to speed up this 
> process ? Is possible to for example make compilation of iostream once, 
> and then everytime use the compiled output of this library to link with 
> my program ?

It might be possible, but it's very hard to implement.  The makers of
GCC haven't implemented this yet, and we only port what they have to
DOS. 


-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019