From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e2617bb212aeb68e X-Google-Attributes: gidfee84,public From: dblake@phy.ucsf.edu (David T. Blake) Subject: Re: DecC vs. gcc-2.8.1, why is the difference in speed so large? Date: 1999/06/04 Message-ID: #1/1 X-Deja-AN: 485729961 Sender: dblake@dylan.ucsf.edu References: Organization: UCSF, ITS Newsgroups: comp.unix.osf.osf1 njmp_walti@njmp_solid.phys.ethz.ch (Christoph Walti) writes: >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? I am not certain what contributes to your speed difference, but I write all kinds of number crunching float/int operations under Dec Unix. I ocassionally try to optimize once for gcc and once for cc. I cannot beat cc for speed. Typically I get 15-20% speed differences. However, I also find subtle differences in the parsing of the compilers, and I am either more used to gcc, or it is more bug free, because I continue to use it. Things like typecasting of arguments tend to get me in much more trouble using cc than gcc. -- Dave Blake dblake@phy.ucsf.edu