Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: bmeyer@bruce.cs.monash.edu.au
Subject: Re: gcc vs Dec Unix c
Date: 1998/01/14	[thread overview]
Message-ID: <69h5rc$5bl$1@wombat.cs.monash.edu.au> (raw)
In-Reply-To: 884563899.2019688456@dejanews.com


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 <stdio.h>
#include <math.h>

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



  parent reply	other threads:[~1998-01-14  5:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-08  5:00 gcc vs Dec Unix c fonte
1998-01-09  5:00 ` Jaap Schellekens
1998-01-09  5:00   ` cekim
1998-01-09  5:00     ` Peter Mardahl
1998-01-09  5:00       ` Craig Burley
1998-01-10  5:00       ` cekim
1998-01-10  5:00         ` Craig Burley
1998-01-13  5:00           ` cekim
1998-01-13  5:00             ` Craig Burley
1998-01-13  5:00               ` [++] x86 FCOS (Was: Re: gcc vs Dec Unix c) Terje Mathisen
1998-01-13  5:00                 ` Andy Glew
1998-01-14  5:00                   ` Terje Mathisen
1998-01-13  5:00               ` gcc vs Dec Unix c James Van Buskirk
1998-01-14  5:00                 ` brianh
1998-01-14  5:00                   ` James Van Buskirk
1998-01-13  5:00             ` Yan-Song Chen
1998-01-13  5:00               ` Greg Lindahl
1998-01-15  5:00               ` Lupo LeBoucher
1998-01-15  5:00                 ` Greg Lindahl
1998-01-13  5:00             ` Rob Komar
1998-01-14  5:00             ` bmeyer [this message]
1998-01-15  5:00               ` cekim
1998-01-14  5:00     ` Donald K.Sinclair
1998-01-14  5:00       ` Rob Komar
1998-01-16  5:00         ` Torbjorn Lindgren
1998-01-17  5:00           ` Rob Komar
1998-01-14  5:00       ` cekim
1998-01-09  5:00 ` Toon Moene
1998-01-09  5:00 ` Toon Moene
1998-01-09  5:00 ` Toon Moene
  -- strict thread matches above, loose matches on Subject: below --
1998-01-13  5:00 Robert Harley
1998-01-14  5:00 ` cekim
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