Article View: comp.sys.atari.st
Article #25783floating point benchmarks
From: Sandra J Loosemore
Date: Thu, 19 Mar 1987 02:38
Date: Thu, 19 Mar 1987 02:38
149 lines
7770 bytes
7770 bytes
I think I must have been asleep when I ran my earlier floating point
benchmarks, because I took a more careful look at it and it turns out I
wrote my numbers down backwards. Here are the correct numbers for
primitive arithmetic operations. These are in 200-hz clock tick units
for 1000 repetitions of the operation, with no attempt made to account
the overhead of the loop. There was no significant difference between
IEEE single and double precision here.
IEEE FFP
+ 15 13
- 15 23
* 22 20
/ 58 19
Ali Ozer <ali@rocky.stanford.edu> recently sent me a floating point
benchmark program called the "Savage" benchmark, which primarily tests
the double-precision floating point math library. I've tacked on his
original message to the end. Here's my C version:
main ()
{ int i, iloop;
double a;
long start, end;
start = gettime ();
a = 1.0;
iloop = 2499;
for (i=0; i<iloop; i++)
a = tan(atan(exp(log(sqrt(a*a))))) + 1.0;
end = gettime ();
printf ("%e\n", (float)(a-2500.0)); /* error term */
printf ("%ld\n", (long)(end - start)); /* elapsed time */
}
And the results for Alcyon C V4.14:
IEEE (libm): 1.763e-7, 72.6 seconds
FFP (libf): 2.269e+2, 7.4 seconds
So the FFP library is much faster, but loses on accuracy as it is only
single precision.
-Sandra (sandra@cs.utah.edu)
-----------------------------------
***************************************************************
* Savage Benchmark Results *
* 16 DEC 1986 *
* Al Aburto/Lew Wolfgang/Larry Phillips/John Gilmore/Ali Ozer *
* Glenn Miller/Mike Howard/And Others........................ *
***************************************************************
123456789012345678901234567890123456789012345678901234567890123456789012345
System CPU / FPP CLOCK LANGUAGE TIME ERROR
(MHz) (Sec) Abs(a-2500)
Turbo-Amiga (68020/68881) 14.32 Absoft F77 V2.2B 0.39 2.7 E-12
Sun-3/160 (68020/68881) 16.67 Sun 3.0 F77 0.4 2.0 E-12
Turbo-Amiga (68020/68881) 14.32 Lattice C/68881 Assem 0.46 9.2 E-13
HP 9000/320 (68020/68881) Fortran 77 0.7 3.2 E-09
HP 9000/320 (68020/68881) Pascal 0.7 2.8 E-07
Amiga (68020/68881) 7.16 Absoft F77 V2.2B 0.78 2.0 E-12
VAX-8600 Fortran 77 0.9 1.8 E-08
Amiga (68020/68881) 7.16 Lattice C/68881 Assem 0.92 5.9 E-12
HP 9000/320 (68020/68881) C 1.0 2.5 E-08
DEC 2060 1.6 2.0 E-12
VAX-11/750 Fortran 77 1.9 6.6 E-10
Masscomp (68010/ FPP) 2.1 3.2 E-07
VAX-11/780 UNIX 4.3BSD F77-O 2.7 1.8 E-12
Turbo-Amiga (68020/68881) 14.32 MetaComCo ABasiC V1.0 3.2 2.3 E+01
DMS ( 8086/ 8087) Turbo Pascal 3.8 1.1 E-09
Zenith Z-248 (80286/80287) 8.00 MS Fortran77 V3.20 4.5 1.2 E-09
IBM PC-AT (80286/80287) 6.00 ProFor F77 4.9 8.7 E-11
IBM PC-AT (80286/80287) 6.00 MS Fortran77 7.2 1.2 E-09
IBM PC-AT (80286/80287) 6.00 Turbo Pascal 7.4 1.2 E-09
IBM PC ( 8088/ 8087) 4.77 Microsoft C 8.0 1.2 E-09
Amiga (68020/68881) 7.16 Metacomco ABasiC V1.0 8.6 2.3 E+01
Turbo-Amiga (68020/-----) 14.32 Metacomco ABasiC V1.0 13.3 2.7 E+02
Turbo-Amiga (68020/-----) 14.32 ABasiC V1.0(Cache Off) 14.7 2.7 E+02
Sun-3/160 (68020/-----) 16.67 Sun 3.0 F77 21.5 3.1 E-07
Turbo-Amiga (68020/-----) 14.32 Absoft F77 V2.2B 21.9 1.8 E-07
Amiga (68020/-----) 7.16 Metacomco ABasiC V1.0 37.0 2.7 E+02
Amiga (68000/-----) 7.16 Metacomco ABasiC V1.0 39.7 2.7 E+02
Amiga (68020/-----) 7.16 ABasiC V1.0(Cache Off) 42.2 2.7 E+02
HP 9826 (68000/-----) 8.00 HP Basic V2.0 44.5 3.2 E-07
Turbo-Amiga (68020/-----) 14.32 Lattice C V3.03 55.4 3.2 E-07
IBM PC-XT ( 8088/ 8087) 4.77 Gauss 58.0 1.2 E-09
Amiga (68020/-----) 7.16 Absoft F77 V2.2B 59.7 1.8 E-07
HP Integral (68000/-----) Basic Interpreter 60.9 3.2 E-07
HP Integral (68000/-----) C 63.0 3.2 E-07
Amiga (68000/-----) 7.16 True Basic (Compiler) 65.2 3.0 E-03
Amiga (68020/-----) 7.16 MS AmigaBASIC V1.0 67.0 3.2 E-07
Amiga (68000/-----) 7.16 MS AmigaBASIC V1.0 73.0 3.2 E-07
Amiga (68000/-----) 7.16 Absoft F77 V2.2B 77.2 1.8 E-07
HP Integral (68000/-----) Absoft F77 100.0 1.8 E-07
Amiga (68020/-----) 7.16 Lattice C V3.03 139.0 3.2 E-07
Macintosh (68000/-----) 7.83 MAC C 221.0 (?)
Amiga (68000/-----) 7.16 Lattice C V3.03 234.0 3.2 E-07
Macintosh (68000/-----) 7.83 DeSmet C 244.0 (?)
Commodore 128( 8502/-----) 2.00 Basic Interpreter 256.0 9.0 E-04
Macintosh (68000/-----) 7.83 Manx Aztec C 353.0 (?)
IBM PC-XT ( 8088/-----) 4.77 BASICA 895.0 3.0 E-08
Tandy PC-5 Basic Interpreter 961.0 2.7 E-03
****************************************************************************
Notes:
(1) The Savage Benchmark, by Bill Savage, first appeared in Dr. Dobb's
Journal, Sept 1983, page 120.
(2) The Macintosh results are from Byte, The Small Systems Journal,
Aug 1986, page 254. There appears to be a 'typo' in the
published accuracy results. Exact result should be 2500.0 .
(3) The Savage Benchmark requires use of IEEE double precision
to obtain a reasonably small error. The error is unacceptably
large for IEEE single precision. All the above results were
obtained with double precision except for the MetaComCo ABasiC
where double precision variables were used but the math functions
were calculated only to single precision. As can be seen ABasiC
is fast but the error is too large for a meaningful result.
-----------------------------------
c Here is the Savage Benchmark Program:
c **************************************
c * Fortran 77 *
c **************************************
Program Savage
implicit double precision (a-h,o-z)
write(*,1000)
a = 1.0
iloop = 2499
do 100 i=1,iloop
a = dtan(datan(dexp(dlog(dsqrt(a*a))))) + 1.0
100 continue
write(*,1010)
write(*,1020) a
1000 format(5x,'Start')
1010 format(5x,'Stop ')
1020 format(5x,'a = ',f22.15)
stop
end
-----------------------------------
Technical Details
Message-ID:
<4393@utah-cs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!rutgers!husc6!ut-sally!utah-cs!sandraShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!rutgers!husc6!ut-sally!utah-cs!sandra From: sandra@utah-cs.UUCP (Sandra J Loosemore) Newsgroups: comp.sys.atari.st Subject: floating point benchmarks Message-ID: <4393@utah-cs.UUCP> Date: Wed, 18-Mar-87 21:38:34 EST Article-I.D.: utah-cs.4393 Posted: Wed Mar 18 21:38:34 1987 Date-Received: Fri, 20-Mar-87 03:51:03 EST Organization: University of Utah CS Dept Lines: 149 Keywords: oops!