public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Faster compilations
@ 2001-12-26  6:26 Devrim Erdem
  2001-12-26  6:57 ` Stephano Mariani
  0 siblings, 1 reply; 2+ messages in thread
From: Devrim Erdem @ 2001-12-26  6:26 UTC (permalink / raw)
  To: gcc-help

Hi,

My huge application has many include files, many derived classes and 
several template classes. It takes a lot of time (30-40s) to compile 
some of my files on my 1GHz, 256 Mb Ram system.

Though I know that getting a faster harddrive and more RAM may help, I 
would like to ask the experts if that would really work. What takes most 
of the time during the compilation  ?

Is it possible to organize files ( other than grouping them into 
libraries ) so that they may compile faster ?

I use precompiled headers on Windows with Visual C++. Is there a similar 
technique with gcc ?

Thanks.

-- 
Devrim Erdem
-------------------------------------
VIRES Simulationstechnologie GmbH
Oberaustrasse 34
83026 Rosenheim
Germany
phone    +49.8031.463640
fax      +49.8031.463645
email    devrim@vires.com
internet www.vires.com
-------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Faster compilations
  2001-12-26  6:26 Faster compilations Devrim Erdem
@ 2001-12-26  6:57 ` Stephano Mariani
  0 siblings, 0 replies; 2+ messages in thread
From: Stephano Mariani @ 2001-12-26  6:57 UTC (permalink / raw)
  To: 'Devrim Erdem', 'gcc-help'

I find it really helps to rebuild gcc with your optimizations specific
to your developed machine. For example if you are on a pentium 4,
rebuild gcc, configure with --disable-checking, compile with -O3
-fomit-frame-pointer -fno-strenght-reduce -mcpu=pentium4 ... Likewise
mcpu=athlon if you are on athlon.
Also, if you have enough ram, always -pipe.

Organise your Makefiles... If possible use autoconf/automake, they have
good dependency tracking, so the minimum number of files are rebuilt.

If you are on a good multitasking OS, eg Linux (2.4 or better),
WinNT/2K/XP, Solaris etc. then you might wish to try "make -j n", where
n is a reasonable number of parallel builds.

Experiment, it usually helps!

Stephano Mariani

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Devrim Erdem
Sent: Wednesday, 26 December 2001 2:19
To: gcc-help
Subject: Faster compilations


Hi,

My huge application has many include files, many derived classes and 
several template classes. It takes a lot of time (30-40s) to compile 
some of my files on my 1GHz, 256 Mb Ram system.

Though I know that getting a faster harddrive and more RAM may help, I 
would like to ask the experts if that would really work. What takes most

of the time during the compilation  ?

Is it possible to organize files ( other than grouping them into 
libraries ) so that they may compile faster ?

I use precompiled headers on Windows with Visual C++. Is there a similar

technique with gcc ?

Thanks.

-- 
Devrim Erdem
-------------------------------------
VIRES Simulationstechnologie GmbH
Oberaustrasse 34
83026 Rosenheim
Germany
phone    +49.8031.463640
fax      +49.8031.463645
email    devrim@vires.com
internet www.vires.com
-------------------------------------




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-26 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-26  6:26 Faster compilations Devrim Erdem
2001-12-26  6:57 ` Stephano Mariani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).