Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Nigel Sale <nms@fgel.demon.co.uk>
Subject: interesting benchmarks
Date: Tue, 3 Sep 1996 12:07:49 +0100	[thread overview]
Message-ID: <87adca3994e65979acee3a8a6b82e076.axp-list@archive.invalid> (raw)

I've just been running some little test problems on out UDB 233 Mhz and
have got some interesting results. The two C programs are below....

****************** benchi **********************************************
#include <stdio.h>

#define MAXI 1000
#define MAXJ 1000
#define MAXK 500

int main(
         int argc,
         char *argv[]
         )
{
  int i, j, k;
  int a, b, c;

  for (i=0;i<MAXI;i++) {
    a = i;
    for (j=MAXJ;j>-MAXJ;j--) {
      b = a*j;
      for (k=MAXK;k>-MAXK;k--) {
        c = b + k;
      }
    }
  }
  printf("%d %d %d\n",a ,b, c);
  exit(0);
}
****************** benchf **********************************************
#include <stdio.h>

#define MAXI 1000
#define MAXJ 1000
#define MAXK 100

int main(
         int argc,
         char *argv[]
         )
{
  int i, j, k;
  double a, b, c;

  for (i=0;i<MAXI;i++) {
    a = (double)i;
    for (j=MAXJ;j>-MAXJ;j--) {
      b = a*(double)j;
      for (k=MAXK;k>-MAXK;k--) {
        c = b + (double)k;
      }
    }
  }
  printf("%f %f %f\n",a ,b, c);
  exit(0);
}
************************************************************************

The execution time (to the nearest second) for the integer program on
the UDB is 35 secs. On a Pentium 166 Mhz system (running Linux of
course) the execution time is 101 secs. Great i thought.

For the floating point program the UDB time is 30 secs. On the Pentium
system the time is 20 secs.

Where am i going wrong ?

I'm running RedHat 3.0.3/AXP straight out of the box, no tweeks ( so gcc
2.7.0 ). I've tried complier options such as no-soft-float and fp-regs
but it makes no difference.

Thanks in advance.

-- 
Nigel Sale, Fluid Gravity

-- 
Nigel Sale

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

             reply	other threads:[~1996-09-03 11:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-03 11:07 Nigel Sale [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-09-03 16:13 interesting benchmarks Richard Gorton
1996-09-03 16:42 ` Nigel Sale
1996-09-03 16:50 David R. Lott
1996-09-03 18:17 Maurice Hilarius
1996-09-03 18:44 John Chu
1996-09-03 19:41 Martin Ostermann
1996-09-03 20:53 David A Rusling
     [not found] <qtkWcFAFGBLyEw+Q@fgel.demon.co.uk>
1996-09-03 22:55 ` Robert Allen Barker
1996-09-03 23:32 Maurice Hilarius
     [not found] <Pine.SUN.3.91.960903112743.17297A-100000@mira.lbl.gov>
1996-09-04  8:07 ` Nigel Sale
1996-09-04 10:59 David A Rusling
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