From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: compiler efficiency Date: 18 Jan 2001 13:26:33 GMT Organization: Aachen University of Technology (RWTH) Lines: 34 Message-ID: <946qu9$kuq$1@nets3.rz.RWTH-Aachen.DE> References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 979824393 21466 137.226.32.75 (18 Jan 2001 13:26:33 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 18 Jan 2001 13:26:33 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Mike Darrett wrote: > Hi guys, > I was running some algorithm benchmarks on DJGPP vs Borland C++ 5.5, and > was shocked to see that DJGPP outperformed Borland C++ on some stack > tests. Actually, that's not too big a surprise. First of all, of all C compilers used on a regular basis by lots of PC programmers, the ones by Borland have never been known as being particularly good at optimization. They've all been tuned towards fast compilation much more than towards fast generated programs. I.e. Borland C++, even in version 5.5, quite likely is no worthy opponent if you want to compare code optimization capabilities. Another point to keep in mind: DJGPP and BC++5.5 are targeting different platforms. DJGPP makes DPMI applications (DOS programs, at the heart of it), whereas BC++5.5 creates 32bit Windows (console) applications. Windows definitely at least has the capability to cause quite some overhead for its programs. In DOS, you have practically 100% of the CPU's attention reserved entirely for your own code, without any background processes or management systems getting in the way unless you call for it (like: read files, access hardware devices via BIOS interrupts, or cause memory paging activity). In short: your comparison may well have been unfair. These days, a real optimization quality test would be between MS VC++, Intel's VTune, and a Win32-targetted version of GCC like MinGW32 or Cygwin. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.