www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/14/08:37:44

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gcc compiles so slow?
Date: Fri, 13 Dec 1996 20:29:07 -0800
Organization: Three pounds of chaos and a pinch of salt
Lines: 44
Message-ID: <32B22D13.5E7D@cs.com>
References: <58s98p$460 AT galileo DOT polito DOT it>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp106.cs.com
Mime-Version: 1.0
To: Jurgen Schwietering <tweety AT Torino DOT ALPcom DOT it>
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jurgen Schwietering wrote:
> 
> I'm searching for a good 32bit dos prot mode development environment and
> trapped on djgpp. After installing i did compile the samples. Hello at
> first. It took about 8 seconds to compile and link, the same programme
> takes about 0.5 secs under BC3.1. Am I doing something wrong, or is this
> normal?  Equipment: Pentium 100/8MB, DOS 6.22, SCSI2, Smartdrive, no other
> TSR. The executable works under go32, and so I added some mallocs,
> getting until 130MB which is as in the documentation. Can I use
> precompiled headers? Can I use another compiler which is GO32 compatible?

With Borland C and other IDE compilers, all the compilation tools are
already loaded into memory and thus require no overhead to run.  OTOH,
the DJGPP tools must be loaded from the hard drive each and every time
they are called.  Also, gcc uses temporary files to pipe data between
tools, which adds some more overhead.

The DJGPP Frequently Asked Questions list (v2/faq202b.zip) states that a
good compilation speed to expect for the most basic "Hello, World"
program is 6-7 seconds.  It also gives a number of tips on improving
speed.  In general, the following things will help you:  loading CWSDPMI
as a TSR (-p option), increasing your SMARTDRV cache, creating a
ramdrive and pointing the "TMPDIR" environment variable to it, and
increasing the size of the transfer buffers of the gcc programs.

With only 8 MB of RAM, you probably can't afford to increase your cache
too much, nor install a ramdrive, so you pretty much have to live with
this overhead.

HOWEVER, once you get past the initial cost of loading the tools, DJGPP
is faster than any other 32-bit compiler with the same code.  Try
comparing the compilation speeds of a fifty-thousand line project
between the two compilers, and you'll see the difference.  "Hello,
world"-type programs are really poor examples for any kind of performace
testing.  ;)

Good luck!

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I |        fighteer AT cs DOT com          |
| Descent 2: The Infinite Abyss - The greatest Internet game of all |
| time just got better!  This time, you're going all the way down...|
---------------------------------------------------------------------

- Raw text -


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