Mail Archives: djgpp/2001/01/18/10:07:31
Mike Darrett <ez073236 AT mailbox DOT ucdavis DOT edu> 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.
- Raw text -