Article View: comp.sys.atari.st
Article #25883Re: Floating Point Benchmarks
From: braner
Date: Sat, 21 Mar 1987 04:55
Date: Sat, 21 Mar 1987 04:55
78 lines
3952 bytes
3952 bytes
[]
Thanks to Sandra Loosemore for posting the interesting benchmarks.
Here are results of the Savage benchmark for Megamax C on the Atari ST
(8 MHz 68000):
time error
Single precision: 146 4.3E+01
Double precision: 496 8.5E-07
Double precision, with 32081: 119 2.2E-08
The Megamax math library (written in C, using sloppy algorithms) is even
slower than the (in)SANE numeric package on the Apple Macintosh, as
exemplified by Aztec C (353 seconds). In comparision, Absoft FORTRAN
on the Amiga did it in 77 seconds (could someone post the Absoft time
on the ST?), Alcyon C v4.14 (libm) clocked in at 73 seconds, and HP BASIC
(also on an 8 MHz 68000) managed 45 seconds. (Any data for Mark Williams C?)
The 32081 case needs explanation: This is _still_ using the Megamax library,
but doing the +-*/ primitives on a 32081 FPU mounted as a peripheral and
running at 4 MHz. This speeded it up by a factor of 4. (Why the error is
smaller I don't know.) That is _not_ the best the 32081 can do. I have
tested, on my ST, an optimized log() function written in assembler language
for the 68000/32081 pair by Hal Hardenbergh of Digital Acoustics. It took
520 microseconds. Extrapolating from there, assuming the other functions
will be as fast, predicts that the Savage benchmark time would be 7 seconds,
or as fast as an IBM AT! Alas, Hal will not disclose his code for the other
functions, and I do not have the time right now to write my own, nor to
replace the 32081 with a 68881 (anybody done that?).
What can be done to improve the performance of your ST in number-crunching?
- Use Absoft FORTRAN
- Use the recent version of Atari/DRI/Alcyon C
- Pressure your favorite C compiler vendor to get it together
- Hack a 32081 onto your ST and
write your own (optimized in AL) math library
- Hack a 68881 onto your ST
- Get a MegaST and a 68881 card (Fall 1987?)
- Wait for the Atari TT (_Supposedly_ Winter 1988)
- Get the MSDOS add-on box for the ST (when?) and add an 8087
- Give up and get a Mac II or a "Turbo Amiga" (big $$$)
- Get an Atari PC (8 MHz 8086) and add an 8087
(Turbo C is here 8-) - Atari PC not yet...)
The 68881 is now about $140, similar in price to the 8087. (Finally!)
It has the transcendental functions built-in (the 32081 does not).
It is designed as a coprocessor for the 68020, although it _can_ be
connected to the 68000 as a peripheral (a lot slower). Is the 68881 card
for the MegaST (rumored) going to have a 68020 too? Is Atari _ever_ going
to build a machine suitable for number-crunching? Keep tuned for the
responses from Atari...
- Moshe Braner
Quiz: what computer comes standard with a mouse but no keyboard?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PS: here is the C code I used:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <stdio.h>
#include <math.h>
#include <osbind.h>
long sysclk;
gettime() {
sysclk = *((long *)0x4BA); /* System variable: 200 Hz counter */
}
main() {
int i, iloop;
double a;
long start, end;
Supexec(&gettime); start = sysclk;
a = 1.0; iloop = 2499;
for (i=0; i<iloop; i++)
a = tan(atan(exp(log(sqrt(a*a))))) + 1.0;
Supexec(&gettime); end = sysclk;
printf("\007time = %f\n", (double)(end-start)/200.0);
printf("error = %e\n", a-2500.0);
}
Technical Details
Message-ID:
<470@batcomputer.tn.cornell.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!seismo!rochester!cornell!batcomputer!branerShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!seismo!rochester!cornell!batcomputer!braner From: braner@batcomputer.UUCP Newsgroups: comp.sys.atari.st Subject: Re: Floating Point Benchmarks Message-ID: <470@batcomputer.tn.cornell.edu> Date: Fri, 20-Mar-87 23:55:34 EST Article-I.D.: batcompu.470 Posted: Fri Mar 20 23:55:34 1987 Date-Received: Thu, 26-Mar-87 04:14:08 EST Reply-To: braner@batcomputer.UUCP (braner) Distribution: world Organization: Theory Center, Cornell University, Ithaca NY Lines: 78 Summary: Megamax performance, also with 32081 FPU