Xref: utzoo comp.sys.hp:9394 comp.benchmarks:689 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!eru!hagbard!sunic!kuling!irf From: irf@kuling.UUCP (Bo Thide') Newsgroups: comp.sys.hp,comp.benchmarks Subject: Re: 68040 and Floats, is this true? Message-ID: <2080@kuling.UUCP> Date: 14 Jun 91 09:54:29 GMT References: <1991Jun07.213219.14174@lynx.CS.ORST.EDU> <3286@sparko.gwu.edu> Reply-To: bt@irfu.se (Bo Thide') Organization: Dept. of Computer Systems, Uppsala University, Sweden Lines: 92 In order to see how well the 68040 performs in general, and on sprintf() in particular, I ran the "C Cost" benchmark on the HP9000/425t (68040/25 MHz), HP9000/400t (68030/50 MHz) and the Sun SparcStation 1. The results are presented below. As is seen, the HP-UX 7.05 sprintf() on the 68040 is a factor of 2 *slower* than on the 68030 but a factor of two *faster* than in SunOS4.1 on the Sun SparcStation (lower numbers = faster). The "C Cost" program is taken from an article titled "An Elementary C Cost Model" written by Jon Bentley, Brian Kernighan, and Chris Van Wyk contained within the Volume 9 Number 2 issue of "Unix Review", February 1991. RESULTS: ------------------------------------------------------------- Operation Mics/N Mics/N Mics/N HP425t HP400t Sun Sparc- (68040) (68030) Station 1 Null Loop (n=1000000) {} 0.00 0.43 0.18 Int Operations (n=1000000) i1++ 0.16 0.18 0.34 i1 = i2 0.16 0.19 0.35 i1 = i2 + i3 0.24 0.35 0.30 i1 = i2 - i3 0.24 0.35 0.30 i1 = i2 * i3 0.36 1.21 0.30 i1 = i2 / i3 2.02 2.11 0.31 i1 = i2 % i3 2.02 2.12 0.30 Float Operations (n=1000000) f1 = f2 0.24 0.19 0.42 f1 = f2 + f3 0.40 2.68 0.43 f1 = f2 - f3 0.40 2.68 0.42 f1 = f2 * f3 0.48 3.29 0.43 f1 = f2 / f3 1.78 3.70 0.42 Numeric Conversions (n=1000000) i1 = f1 1.83 4.92 0.49 f1 = i1 0.49 1.92 0.79 Integer Vector Operations (n=1000000) v[i] = i 0.41 0.39 0.38 v[v[i]] = i 0.59 0.71 0.62 v[v[v[i]]] = i 0.73 0.83 0.82 Control Structures (n=1000000) if (i == 5) i1++ 0.28 0.27 0.12 if (i != 5) i1++ 0.38 0.39 0.67 while (i < 0) i1++ 0.32 0.18 0.12 i1 = sum1(i2) 0.20 0.82 0.60 i1 = sum2(i2, i3) 0.28 1.11 0.67 i1 = sum3(i2, i3, i4) 0.32 1.42 0.84 Input/Output (n=10000) fputs(s,fp) 10.00 15.57 15.42 fgets(s,9,fp) 11.20 20.37 11.42 fprintf(fp,sdn,i) 28.40 48.37 65.82 fscanf(fp,sd,&i1) 47.60 80.77 89.42 Malloc (n=20000) free(malloc(8)) 7.60 19.57 28.82 push(i) 6.20 15.77 14.02 i1 = pop() 0.60 1.97 2.22 String Functions (n=100000) strcpy(s,s0123456789) 2.08 3.97 5.06 i1 = strcmp(s,s) 3.52 4.93 6.14 i1 = strcmp(s,sa123456789) 1.16 1.49 3.42 String/Number Conversions (n=10000) i1 = atoi(s12345) 5.60 8.37 7.02 sscanf(s12345,sd,&i1) 48.40 81.57 97.02 sprintf(s,sd,i) 23.20 40.77 63.02 f1 = atof(s123_45) 81.20 56.37 558.62 sscanf(s123_45,sf,&f1) 148.80 146.37 478.62 sprintf(s,sf62,123.45) 250.40 127.57 519.02 Math Functions (n=20000) i1 = rand() 1.60 2.17 6.22 f1 = log(f2) 33.20 25.37 13.02 f1 = exp(f2) 26.40 19.77 16.42 f1 = sin(f2) 24.20 20.37 19.82 f1 = sqrt(f2) 4.60 12.57 26.82 ---------------------------------------------------------------------- I've cross-posted to comp.benchmarks for possible comments. Bo --- ^ Bo Thide'-------------------------------------------------------------- |I| Swedish Institute of Space Physics, S-755 91 Uppsala, Sweden |R| Phone: (+46) 18-303671. Telex: 76036 (IRFUPP S). Fax: (+46) 18-403100 /|F|\ INTERNET: bt@irfu.se UUCP: ...!uunet!sunic!irfu!bt ~~U~~ -----------------------------------------------------------------sm5dfw