From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Why is DJGPP slower than gcc under linux? Date: Mon, 01 Dec 1997 00:08:26 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 30 Message-ID: <3481FFFA.44AD@cs.com> References: <34820096 DOT 154339 AT news DOT clear DOT net DOT nz> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp205.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Glenn Reed wrote: > > Here is something I am curious about. I've written the same program > for both DJGPP and linux gcc compiler. The code is compatible for > both OS's. However I notice that the compile time using gcc is > shorter than DJGPP. I know both compilers run under protected mode. > Is it something to do with the DOS file system? Or perhaps linux's > caching ability? I'm not using smartdrive (that comes with ms-dos) at > the moment, would you recommend that I use this with DJGPP? Absolutely. SMARTDRV speeds up DJGPP compilation by a large factor. Another big speed increase can be realized by setting the TMPDIR environment variable to point to a RAM drive (see MS-DOS help to learn how to use this). This is, of course, only an option if you have enough RAM to make it worthwhile. Also, if you run DJGPP from a Win95 DOS shell, you'll find that it goes a lot faster than under plain DOS, because Win95 has a much better disk cache. Part of the overhead of all DJGPP programs is loading and setting up the DPMI environment, and interfacing between the 32-bit program and 16-bit DOS. Under Linux, none of that is necessary, so you'll have a small speed increase in Linux regardless of what else you do. -- --------------------------------------------------------------------- | John M. Aldrich | "A 'critic' is a man who creates | | aka Fighteer I | nothing and thereby feels qualified | | mailto:fighteer AT cs DOT com | to judge the work of creative men." | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------