Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Mark Gelinas <gelinas@bismuth.zk3.dec.com>
Subject: Re: DecC vs. gcc-2.8.1, why is the difference in speed so large?
Date: 1999/06/07	[thread overview]
Message-ID: <sjkemjnqyrc.fsf@bismuth.zk3.dec.com> (raw)
In-Reply-To: njmp_walti-0406991535540001@otto-5.ethz.ch

njmp_walti@njmp_solid.phys.ethz.ch (Christoph Walti) writes:

> Hi,
> 
> recently, I compared the speed of a very simple program (posted below),
> which was once compiled using DecC and a second time using GNU gcc-2.8.1
> on a Digital-alpha staion DS20 with DUnix4.0F. To my very surprise, the
> DecC-compiled version was at least 30, if not even 50 times as fast as the
> gcc-compiled version! I did not use any optimisation flags, but the ones
> which are set by default (are there any? I don't know.)
> Does someone know, where this enormous difference comes from? Does the
> DecC compiler realize, that in this loop nothing is to do anyway, and
> therefore, the result is known from the very beginning and can be put in
> the executable directly?
> 
> Thanks for your help
> 
> Chris
> 

On DU4.0F, the DEC C compiler defaults to -O1 (minimal optimization).
If memory serves, gcc defaults to -O2.

I've seen postings where user testing has shown that the DEC C math
libraries can improve performance of calculation-intensive code by a
factor of 50 or more.  This is because they were crafted for the Alpha
CPU, so can best take advantage of it. Gcc has no/darn little Alpha-specific
optimization capabilities. Egcs is better, but not much. If you want speed,
use the DEC C compiler.

> 
> PS1: This difference in speed persists, when the printf-statement is
> removed.

Again, math libraries make the difference.

> PS2: The gcc version was compiled on this machine (and should be
> optimized for ev6).
> 

Compiling natively will only make gcc run faster on the DS20. It will not
allow gcc to produce better EV6-specific binaries.

MarkG
-- 
Mark Gelinas                         Compaq Computer Corporation
EMail: gelinas@zk3.dec.com           110 Spit Brook Road, ZKO3-3/V08
Phone: +1 (603) 884-1511             Nashua, NH 03062-2698   USA
Views expressed are my own, and not necessarily those of my employer.



  parent reply	other threads:[~1999-06-07  4:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-04  4:00 DecC vs. gcc-2.8.1, why is the difference in speed so large? Christoph Walti
1999-06-04  4:00 ` David T. Blake
1999-06-08  4:00   ` Jeff Sullivan
1999-06-07  4:00 ` Mark Gelinas [this message]
1999-06-08  4:00 ` Serguei Patchkovskii
1999-06-08  4:00   ` Jeff Sullivan
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox