Mail Archives: djgpp/1996/10/17/04:15:41
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 -