/* program to benchmark FP native code*/ #include #include #include void main(void) /* Note that defining i,j,m as local variables below decreases * execution speed from 30 sec to 18 sec */ { clock_t now ; double i,j,k; printf("starting C program ....\n"); now = clock()/CLOCKS_PER_SEC ; for (i=1; i<=10000 ; i++) for (j=1; j<=10000 ; j++) k=i*j; printf("Time for 1E8 double multiplies: %5d secs\n",clock()/CLOCKS_PER_SEC - now); }