From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <87adca3994e65979acee3a8a6b82e076.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199609030730.AA25102@server.net4you.co.at> Date: Tue, 3 Sep 1996 12:07:49 +0100 From: Nigel Sale Subject: interesting benchmarks 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 #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-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 #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-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