From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,b79a29863eb727e7 X-Google-Attributes: gid111c93,public From: bmeyer@bruce.cs.monash.edu.au Subject: Re: gcc vs Dec Unix c Date: 1998/01/14 Message-ID: <69h5rc$5bl$1@wombat.cs.monash.edu.au>#1/1 X-Deja-AN: 315568488 X-NNTP-Posting-User: root References: <694nm1$74c$1@news2.xs4all.nl> <884364975.2133262340@dejanews.com> <695t9e$kft$1@agate.berkeley.edu> <884411893.151322629@dejanews.com> <884563899.2019688456@dejanews.com> X-MD5: b98d9f82c8b011925a63afcd233de208 Reply-To: bmeyer@bruce.cs.monash.edu.au Organization: This is innd taking over... Newsgroups: comp.os.linux.alpha cekim@ix.netcom.com writes: >PPRO 200 w/cos =10 minutes -120 billion cycles >ALpha 533 w/cos =65 minutes -2.08 trillion cycles [...] >I asked the loop to run 1 billion times so I have rougly [2000 ALPHA] cycles >per loop given the number above for the PPRO. I find this result confusing. I just tried the following program on my ALPHA: ========== #include #include int main(int argc, char** argv) { double a,b,c; long count; a=2; b=3; c=4; for (count=0;count<10000000;count++) { a=cos(a)/b+c/a; } printf("Answer is %f\n",a); } ========== Once with and once without the cos (i.e. "a=a/b+c/a;"). The difference in exacution time was about 4.5 seconds on my 433MHz ALPHA, or roughly 2 billion cycles. However, the ALPHA calculated TEN million cosines in that time, for only 200 (two HUNDRED) cycles per cosine. Is it possible you timed your stuff using "time", and have an old and broken version of time? Or that you may have fallen victim to the 1:10 difference in HZ between linux/Intel and linux/ALPHA? >I am very curious now, I would like to hunt through the code and see if >there is an FCOS in there. I would hope there is. There certainly is one if I compile the above on Intel, using gcc -O6. Bernie -- ============================================================================ "It's a magical world, Hobbes ol' buddy... ...let's go exploring" Calvin's final words, on December 31st, 1995