n8643084@unicorn.WWU.EDU (owings matthew) (07/18/90)
Sorry, I didn't know how to go find the old message, so I hope this person recognizes this. I compiled this with aztec 3.6a with the following commands: cc -fi bmark ln bmark -lma -lc I ran it with no other tasks running (I closed the clock), besides the normal system tasks. My system is a stock A500 with 1 meg. (68000, no coprocessor). Somebody please run this with a faster processor or coprocessor or both. Run from the ram disk I got: 97.0873786407767. From disk : 96.6183574879227. The disk i/o slowed it down about .57 I am putting the ram disk result in the following list since this program doesn't measure disk speed. The only changes I made to this program were: Changed the comments from asteriks to /* */ (Asteriks don't work with aztec 3.6a) Changed to open braces to closing braces, since they were wrong. /* Program to get a "crude" estimate of the performance of a system. The rate is the number of 3x3 matrix multiplies done 20000 times divided by the elapsed time in seconds. 6/24/90 rates for Idx loop of 20000: Machine rate relative ------------------------------------------------------------------ 1 Leading Edge PC-XT 7.44 MHz 185.19 1.0 with 8087. 2 Sun 3/280 ffpa 2857.14 15.4 3 Sun 3/50 68881 1176.47 6.4 4 Sun 3/280 SPARC 10000.0 54.0 5 Packard-Bell 386SX w/out /387 127.39 0.69 16 MHz floating point emulation 6 Amiga 500 w/ 68000, w/o coprocessor 7.16 MHZ 97.09 0.52 */ #include <stdio.h> #include <time.h> double a[3][3], b[3][3], c[3][3]; void main() { unsigned Idx; int i, j, k; long time1, time2; double rate; time (&time1); for (Idx=0; Idx<20000; Idx++) { for (i=0; i<3; i++) for (j=0; j<3; j++) { c[i][j] = 0; for (k=0; k<3; k++) c[i][j] += a[i][k] * b[k][i]; } } time (&time2); rate = (20000)/((double)(time2 - time1)); printf ("\n\n rate = %8.41f\n", rate); }