From: lupe@ukw.uucp (Lupe Christoph)
Newsgroups: alt.folklore.computers
Subject: Re: Pgm to calculate pi (56 secs on 486/33 46 secs on Amiga 4000)
Date: 6 Jan 93 21:13:04 GMT
Organization: cic

liljeber@hydra.Helsinki.FI (Mika Liljeberg) writes:

>In article <1993Jan01.115722.18043@crash> uzun@crash.cts.com (Roger Uzun) wrote:
>> /******* pgm begins here ********/
>> /* Amiga 3000 can do 3,000 PI digits in approx 3 mins 8.05 seconds */
>> /* Amiga with 50 mhz 030 can do 3,000 PI digits in approx 2 mins 11 secs */
>> /* Amiga 4000 in 46 secs */
>> /* 33 Mhz 386 under Xenix in 1 Min 35 secs */
>> /* 33 Mhz 386 under Turbo C 7 Mins 58 secs */
>> /* 33 Mhz 486 under Turbo C 4 Mins 40 secs */
>> /* 33Mhz 386  under HI C 1 Minute 30 secs */
>> /* 33Mhz 486  under HI C 0 Minute 56 secs */

>For kicks, I ran this on a 486DX/50 running Linux. I used GCC 2.3.3
>with full optimizations. The time for 3000 digits is 32 seconds. :-)

Here are my figures for SPARCstations:

            			SS IPX	SS 10-20
   cc -O			 48.8u	42.9	
   gcc 1.42 -O			 47.0u	41.0	
   gcc 2.3.3 -O2 		 45.5u	39.0	
   acc 2.0.1 -cg89		 46.8u	41.1	
   acc 2.0.1 -cg92		253.1u	17.7	
  			       +307.1s		

   acc options: -fsingle -O4 -dalign -fnonstd -libmil

   acc is SunPro's SPARCcompiler C. I was running SunOS 4.1.3.

SPARC notes:
shift() uses one division (twice the same) and two multiplications.
The SPARC architecture does not include these instructions
before version 8; there is only a multiply step instruction.
The only V8 SPARC implementations used in Sun machines today are
the TI Viking (in the SS10 and the 6x0 MP) and the TI Tsunami
(in SPARCclassic and SS LX). All earlier machines have to use
support functions to execute multiplication and division
(and others, as well).

The bundled Sun compiler and both GNU compilers will not (yet?)
generate V8 code. The newest SPARCcompilers (e.g. C 2.0.1) will.
The option -cg92 specifies not only V8 instructions but also
instruction scheduling for the TI Viking.

On SPARC V7 CPU's V8-only instructions will be trapped into the
kernel and emulated. This leads to the extremely large user
and system time for the IPX/-cg92. System time is neglegable
for all other runs.

For people who don't have the data for the two SPARC machines
handy: the IPX uses a 40 MHz clock rate. I forgot the chip set;
it is *not* the one used in the SS2. The SS 10-20 uses a 33 MHz
TI Viking processor. The Viking has a total on-chip cache
of 36 KB. I expect the instructions of the program's hot spot
and all the relevant data to fit into this cache. Hence,
performance will certainly scale with clock rate for other
Viking variants, like the 36 MHz SS 10-30 and even the -41,
even though the latter has a 1 MB secondary cache.

Moral: gcc 2.3.3 beats SunPro's compiler in this program,
but only by a small margin. An adequate instruction set
beats everything else.
-- 
| ...!unido!ukw!lupe  (German EUNet, "bang")     |  Disclaimer:            |
| lupe@ukw.UUCP       (German EUNet, domain)     |  This is an unofficial  |
| suninfo!alanya!lupe (Sun Germany)              |  opinion of Christoph & |
| Res non sunt complicanda praeter necessitatem. |  Imschweiler Consulting |
Newsgroups: alt.folklore.computers