[comp.sys.amiga] 68881 and the PA

iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley) (01/01/89)

[In "Re: 68881 and the PA", William J. Coldwell said:]
:
: The math chip will only speed up IEEE math functions, not FFP, or regular
: integer/transcendental math functions.
:
: What it will speed up: Programs that are compiled to use IEEE by the IEEE
: libraries (provided on the WB1.3 enhancer or the PA disk).
:
: It iss a good bet that anything that uses math intensive functions will
: eventually be recompiled for IEEE.
:
Only for those applications for which the need for Double Precision
is more important than the need for speed or compatibility.
For Single Precision applications, FFP is still faster, math chip or no.
And everyone has FFP.

Post a Whetstone rating for the PA and I might change my mind.


--Bill Kinnersley
  Physics Department   Montana State University    Bozeman, MT 59717
  INTERNET: iphwk@terra.oscs.montana.edu      BITNET: IPHWK@MTSUNIX1

billsey@agora.UUCP (Bill Seymour) (01/03/89)

From article <6180@louie.udel.EDU:, by iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley):
: 
: [In "Re: 68881 and the PA", William J. Coldwell said:]
: :
: : The math chip will only speed up IEEE math functions, not FFP, or regular
: : integer/transcendental math functions.
: :
: : What it will speed up: Programs that are compiled to use IEEE by the IEEE
: : libraries (provided on the WB1.3 enhancer or the PA disk).
: :
: : It iss a good bet that anything that uses math intensive functions will
: : eventually be recompiled for IEEE.
: :
: Only for those applications for which the need for Double Precision
: is more important than the need for speed or compatibility.
: For Single Precision applications, FFP is still faster, math chip or no.
: And everyone has FFP.

	What Bill as failed to mention here is the libraries that Larry
Gutkowski has written for the Absoft FORTRAN compiler. They allow both
single and double precision access to the math chip. That gives you a
*much* better performance than just using the double precision IEEE. Let's
all hope for a single precision IEEE for 1.4...

: Post a Whetstone rating for the PA and I might change my mind.

	I don't have a whetstone for you, but these are the results from
Larry's benchmarks...

                          Summary of Timing Results
                          =========================
 
Note: the following information has been obtained using Creative Micro-
      systems Processor Accelerator board to "hold" the 68881.  Similar
      results (to those for the 7MHz CPU ) have been obtained using a 
      68881 in Microbotics, Inc.'s Starboard II Multifunction Module.
  
The following represents a summary of Double and Single precision timing
results for the Benchmark programs provided in BMarkCMI881.arc.  The
controllable factors affecting execution time include: precision of number
representation, processor speed, and method of floating point calculation.
Thus, to exhaust all the combinations requires eight different
"configurations":
          
            FPU method        Processor Speed     Number Precision
         -----------------    ---------------     ----------------
     1)  Software (f77.rl)         7 MHz           Double (64 bit)
     2)                                            Single (32 bit)
     3)                           14 MHz           Double
     4)                                            Single
     5)  Hardware (hdw.rl)         7 MHz           Double
     6)                                            Single
     7)                           14 MHz           Double
     8)                                            Single

Also affecting the results of these benchmarks is the configuration of
the computer system on which they were run.  The configuration was as
follows:
                 Language/Compiler:     Absoft AC/Fortran(tm) v2.3
                 Software Math Fcns:    Absoft f77.rl
                 Hardware Math Fcns:    L.J. Gutkowski hdw.rl
                 Computer:              Amiga A1000
                 CPU:                   7/14MHz MC68000 on CMI's
                                        Processor/Accel Board
                 Math Coprocessor:      MC68881RC16 at 16MHz
                 Memory Size:           2.5 Mb; 512k Chip, 2Mb Fast
                 Operating System:      Kickstart/Workbench 1.2
                 
                 All of the benchmark programs were loaded into
                 Fast Ram when they were executed.

Some investigation has shown that the speed of the MC68881 has little
effect on Benchmark times.  Speeds of 12, 16, and 20 MHz have all been
used with little change in function execution speeds seen.

Most of the work in using the MC68881 involves setting it up to perform
the required operation.  This setup is performed at the CPU speed.  In 
fact, as you can see below, the benchmark for +,-,*,/ in single precision
is fastest when done in **software** at 14MHz!  The difference is slight
but can be reasoned as follows.

The Absoft f77.rl is extremely fast for a software library (one of the
fastest).  And the overhead in setting up the MC68881 for a single 
precision function in hardware far outweighs the speed of the actual
hardware function calculation.  Therefore, the software calculation speed
can begin to compete with the hardware calculation (and in this case win
even if only by a hair).  Please note, however, that the +,-,*,/ bench-
mark is actually comparing the average execution speed of the four basic
math functions.  

As the precision is increased to double precision, the basic math
functions are consistently faster in hardware compared to software
(about 20 to 25 percent decrease in time for a given CPU speed).
And when it comes to double precision transcendental functions, the
reductions in time can be over 90 percent (97 percent less time in the
Savage benchmark below).  

The Savage benchmark is really an exercise in raw FPU power and doesn't
really reflect a practical program.  For a typical practical program that
uses some transcendentals (double precision), it appears one should be able
to reasonably expect programs that run at least 4 to 10 times faster.


                      Savage (Fortran.hard & Fortran.soft)
                     
          | Fortran.soft    Fortran.soft    Fortran.hard    Fortran.hard
Precision |    7 MHz           14 MHz          7 MHz           14 MHz
----------+-------------------------------------------------------------
 Double   |   636.860 (secs)  512.560          18.240          16.520
 Single   |   162.100         133.540          16.180          14.780


           FourBanger (+,-,*,/ found in ByteFPU.hard & ByteFPU.soft)
           
          | ByteFPU.soft    ByteFPU.soft    ByteFPU.hard    ByteFPU.hard
Precision |    7 MHz           14 MHz          7 MHz           14 MHz
----------+-------------------------------------------------------------
 Double   |    94.780 (secs)   78.040          68.100          60.420
 Single   |    61.080          49.620          59.340          52.960


           Fintegrate (sin(x) found in ByteFPU.hard & ByteFPU.soft)
           
          | ByteFPU.soft    ByteFPU.soft    ByteFPU.hard    ByteFPU.hard
Precision |    7 MHz           14 MHz          7 MHz           14 MHz
----------+-------------------------------------------------------------
 Double   |   154.180 (secs)  124.140          13.980          12.580
 Single   |    48.280          39.340          12.080          10.940
          
          
            Fintegrate (e**x found in ByteFPU.hard & ByteFPU.soft)
           
          | ByteFPU.soft    ByteFPU.soft    ByteFPU.hard    ByteFPU.hard
Precision |    7 MHz           14 MHz          7 MHz           14 MHz
----------+-------------------------------------------------------------
 Double   |   153.560 (secs)  124.420          14.380          13.000
 Single   |    59.640          48.900          12.580          11.380
 
************************************************************************ 

For information on "hdw.rl" for use with Absoft AC/Fortran(tm), contact:

                         Larry J. Gutkowski,
                     Technical Software Developer
                        305 S.E. 152nd Court
                        Vancouver, WA  98684
                   (206) 254-7974 (voice and/or msg)
                  
Other useful information:

      14MHz Processor Accelerator          Absoft AC/Fortran for Amiga
          with MC68881 Socket               (ANSI 77 with Extensions)
     ---------------------------------     ---------------------------
       Creative Microsystems, Inc.             Absoft Corporation
     10110 S.W. Nimbus Avenue, Ste B1           2781 Bond Street
          Portland, OR  97223                Auburn Hills, MI  48057
            (503) 684-9300                    (313) 853-0095 (voice)
                                              (313) 853-0000 (modem)
                                                            1200 baud
                                                            
                          Memory Expansion with 68881
                          Socket (Multifuncion Module)
                         -----------------------------
                               Microbotics, Inc.
                           811 Alpha Drive, Suite 335
                            Richardson, Texas  75081
                                 (214) 437-5330
                                 


: 
: --Bill Kinnersley
:   Physics Department   Montana State University    Bozeman, MT 59717
:   INTERNET: iphwk@terra.oscs.montana.edu      BITNET: IPHWK@MTSUNIX1
-- 
     -Bill Seymour             ...tektronix!reed!percival!agora!billsey
                               ...tektronix!sequent!blowpig!billsey
     Creative Microsystems   Northwest Amiga Group    At Home Sometimes
     (503) 684-9300          (503) 656-7393 BBS       (503) 640-0842

rg20+@andrew.cmu.edu (Rick Francis Golembiewski) (01/05/89)

>Only for those applications for which the need for Double Precision
>is more important than the need for speed or compatibility.
>For Single Precision applications, FFP is still faster, math chip or no.
>And everyone has FFP.
>Post a Whetstone rating for the PA and I might change my mind.

For basic (ie addition, subtraction, multiplication, etc. ) functions
the speeds of FFP and IEE (with 68881) are about the same, however I
tried comparing transcendental (ie ln, sin, cos, etc.) functions with
and without the 68881, [I was using StarBoard II multi-function module
with a preferial device {basically the same system that PA uses} 68881
at 12 Mhz ]  the 68881 was nearly 30 TIMES faster (and with a 68020
it would be faster still...), plus you get the extra double
precision.  So if you have an application that does a lot of Trig,
then it would definately help to support the '881.

+----------------------------------------------------------------------------+
| Disclaimer: Me?  Post That, impossible I never post anything...            |
| TypetoYouLater(Everyone); --> "functional Good bye"....                    |
| Rick Golembiewski [ Pronunciation is half the Battle, spelling the other]  |
+----------------------------------------------------------------------------+