www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/17/04:15:41

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gcc compilation time?
Date: Wed, 16 Oct 1996 21:48:12 -0700
Organization: Three pounds of chaos and a pinch of salt
Lines: 39
Message-ID: <3265BA8C.3152@cs.com>
References: <326559FA DOT 5DBA AT iamerica DOT net>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp106.cs.com
Mime-Version: 1.0
To: Jon Slaughter <lobo AT iamerica DOT net>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jon Slaughter wrote:
> 
> Why does gcc take so long to compile a small program? Is there anyway to
> speed it up?

In any compilation, you have to deal with the overhead of loading the
tools each time.  The relative proportion of load time to compile time
decreases with the size of the program you are compiling.  On a 486/66
with a standard HD and 8 MB of RAM, compilation of a "hello world"
program should take about 6-7 seconds.

If your times are much larger than that, consult the FAQ
(v2/faq201b.zip) section 7 for tips and hints.  Some suggestions:

If you are running on a low memory (under 8 MB) machine, consider
removing drivers from your config.sys and autoexec.bat to free up RAM. 
At most, leave a small SMARTDRV cache.

If you are running on a machine with sufficient memory, increase the
size of your SMARTDRV cache and/or install a ramdrive and point the
TMPDIR environment variable to it.  Sufficient cache space can
significantly reduce the overhead of loading the compiler.

You can also try increasing the size of the transfer buffer of ld.exe,
which can significantly improve the linker's performance when running
off of a network drive.

Please try to make your questions more specific next time, as plenty of
people use DJGPP to compile small programs and don't have any problems.

-- 
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>+ W++ N++ o+ K? w(---) O-
M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+ tv+() b+++ DI++ D++ G e(*)>++++
h!() !r !y+()
------END GEEK CODE BLOCK------

- Raw text -


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