Mail Archives: djgpp/2002/04/10/13:45:06
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 -