[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1789.0. "Need help with a benchmark (tonight)" by COOKIE::WECKER (Good old 6844A7B7A5000965D0) Tue Oct 18 1988 16:26

Anyone want to help with a quick and dirty benchmark? Enclosed is a README
file that contains the benchmark source and a makefile. Also, compiled
versions of the benchmark are in:

	COOKIE""::DISK$GZ_2:[WECKER.AMIGA]PI.ARC

If you can run them this evening (takes a couple of minutes). Please send me
the numbers that you get back (most interested in a vanilla Amiga (with the
possible addition of a 68881)).

Also anyone with a 68010? The turbo 68000 board?

BTW:

	- don't run anything else during the benchmark
	- run at least twice (send me LOWEST number you get).
	- make sure you tell me the CPU configuration you're using.

Thanks!
dave

P.S.	I will post results as well as numbers for Vaxen (doing them now).

=================
To run benchmark:
=================

    Type one of:

	PI_SINGLE   for single precision (32 bit) floating point
	PI_DOUBLE   for double precision (64 bit) floating point
	PI_68881    for double precision with co-processor *
	PI_68020    for single precision with 68020 processor instructions #
	PI_68020D   for double precision with 68020 processor instructions #
	PI_68020C   for double precision with 68020 and 68881 *#

    * = must have 68881
    # = must have 68020

===============
Results so far:
===============

Amiga 1000 with 68000 (at 7.16 MHZ) and 68881 (at 7.16 MHZ)
------------------------------------------------------------

    Test	Description		usecs
    ---------	-----------------	-----
    PI_SINGLE	32 bit			 ? 
    PI_DOUBLE	64 bit			 ? 
    PI_68881	64 bit & 68881		 ? 

Amiga 1000 with 68020 (at 7.16 MHZ) and 68881 (at 7.16 MHZ)
------------------------------------------------------------

    Test	Description		usecs
    ---------	-----------------	-----
    PI_SINGLE	32 bit			323
    PI_DOUBLE	64 bit			981
    PI_68881	64 bit & 68881		169
    PI_68020	32 bit & 68020		266
    PI_68020D	64 bit & 68020		932
    PI_68020C	64 bit & 68020 & 68881	128

Amiga 1000 with 68020 (at 7.16 MHZ) and 68881 (at 16 MHZ)
------------------------------------------------------------

    Test	Description		usecs
    ---------	-----------------	-----
    PI_SINGLE	32 bit			326
    PI_DOUBLE	64 bit			990
    PI_68881	64 bit & 68881		136
    PI_68020	32 bit & 68020		268
    PI_68020D	64 bit & 68020		920
    PI_68020C	64 bit & 68020 & 68881	 97

Amiga 1000 with 68020 (at 16 MHZ) and 68881 (at 16 MHZ)
------------------------------------------------------------

    Test	Description		usecs
    ---------	-----------------	-----
    PI_SINGLE	32 bit			 ? 
    PI_DOUBLE	64 bit			 ? 
    PI_68881	64 bit & 68881		 ? 
    PI_68020	32 bit & 68020		 ? 
    PI_68020D	64 bit & 68020		 ? 
    PI_68020C	64 bit & 68020 & 68881	 ? 


=========
Makefile:
=========

CC	= cc
LN	= ln
CFLAGS	= +L -n
LFLAGS	= -g
LIBS	= -lc32
OBJS	= pi.o

all : pi_SINGLE pi_DOUBLE pi_68881 pi_68020 pi_68020D pi_68020C

pi_SINGLE : pi.c
	$(CC) $(CFLAGS) +ff -DDODOUBLE=0 -o [email protected] pi.c
	$(LN) $(LFLAGS) [email protected] -lm32 $(LIBS)

pi_DOUBLE : pi.c
	$(CC) $(CFLAGS) +fi -DDODOUBLE=1 -o [email protected] pi.c
	$(LN) $(LFLAGS) [email protected] -lma32 $(LIBS)

pi_68881 : pi.c
	$(CC) $(CFLAGS) +f8 -DDODOUBLE=1 -o [email protected] pi.c
	$(LN) $(LFLAGS) [email protected] -lm832 $(LIBS)

pi_68020 : pi.c
	$(CC) $(CFLAGS) +2 +ff -DDODOUBLE=0 -o [email protected] pi.c
	$(LN) $(LFLAGS) [email protected] -lm32 $(LIBS)

pi_68020D : pi.c
	$(CC) $(CFLAGS) +2 +fi -DDODOUBLE=1 -o [email protected] pi.c
	$(LN) $(LFLAGS) [email protected] -lma32 $(LIBS)

pi_68020C : pi.c
	$(CC) $(CFLAGS) +2 +f8 -DDODOUBLE=1 -o [email protected] pi.c
	$(LN) $(LFLAGS) [email protected] -lm832 $(LIBS)



=====
pi.c:
=====

#include <stdio.h>
#include <math.h>

#include "exec/types.h"
#include "exec/lists.h"
#include "exec/nodes.h"
#include "exec/ports.h"
#include "exec/io.h"
#include "exec/devices.h"
#include "devices/timer.h"

#define msgblock    tr.tr_node.io_Message
struct	timerequest tr;
struct	timeval	    t1,t2;

#if DODOUBLE
#   define PRECISION double
#else
#   define PRECISION float
#   endif

main(argc,argv)
char	**argv;
    {
    int		i,last,incr,sgn;
    PRECISION   pi,div;

    if (argc > 1)   last = atoi(argv[1]);
    else	    last = 100000;
    if (argc > 2)   incr = atoi(argv[2]);
    else	    incr = 10000;

    pi  = (PRECISION)0.0;
    div = (PRECISION)1.0;
    sgn = 0;

    OpenDevice(TIMERNAME,UNIT_MICROHZ,&tr,0L);
    msgblock.mn_Node.ln_Type	= NT_MESSAGE;
    msgblock.mn_Node.ln_Pri	= 0L;
    msgblock.mn_Node.ln_Name	= NULL;
    msgblock.mn_ReplyPort	= NULL;
    tr.tr_node.io_Command	= TR_GETSYSTIME;
    DoIO(&tr);
    t1 = tr.tr_time;

    for (i=0; i<last; i++) {
	if (sgn) pi -= (PRECISION)4.0  / div;
	else     pi += (PRECISION)4.0  / div;
	sgn = 1 - sgn;
	div += (PRECISION)2.0;
	if (!(i%incr)) {
#	    if DODOUBLE
		printf("%6d: %lf\n",i,(double)pi);
#	    else
		printf("%6d: %f\n",i,(float)pi);
#		endif
	    }
	}
    DoIO(&tr);
    t2 = tr.tr_time;
    CloseDevice(&tr);

    if (t2.tv_micro < t1.tv_micro) {
	t2.tv_secs--;
	t2.tv_micro += 1000000;
	}
    t2.tv_micro -= t1.tv_micro;
    t2.tv_secs	-= t1.tv_secs;
    if (t2.tv_secs > 2147) printf("More than 35 minutes elapsed\n");
    else {
	i  = t2.tv_secs * 1000000;
	i += t2.tv_micro;
	i /= last;
	printf("%d usecs per loop\n",i);
	}
    }

T.RTitleUserPersonal
Name
DateLines
1789.1I'll try...RAVEN1::EVERHARTTue Oct 18 1988 17:156
    I'll try to run it on my Amiga 1000 with a 68010, 512k, external
    3.5 " drive.  That is assuming that it makes it to my local host
    by tonight.
    
     - Chris
    
1789.2Vaxen are giving wierd resultsCOOKIE::WECKERGood old 6844A7B7A5000965D0Tue Oct 18 1988 18:2392
re:	.1

Great!	Now we need a 68000 taker...


P.S. I'm getting some very wierd VAX numbers (O/S dependent):

			single	double
	uVAX-II	ULTRIX	57	46
		VMS	88	69
	8350	ULTRIX	34	28
	8650	VMS	18	15
	8700	ULTRIX	10	 9
		VMS	18	15

Is VMS REALLY 60% slower than ULTRIX (i.e. What am I doing wrong?) ???

Here is the VMS DESCRIP.MMS file and the PI_VAX.C program:

####################################################################
CC	= cc
LINK	= link
CFLAGS	=
LFLAGS	=
LIBS	=

all : pi_vax.exe pi_vaxD.exe

pi_vax.exe :
	$(CC) $(CFLAGS) /define=(DODOUBLE=0) pi_vax.c
	$(LINK) $(LFLAGS) /exe=$@ pi_vax.obj $(LIBS)

pi_vaxD.exe :
	$(CC) $(CFLAGS) /define=(DODOUBLE=1) pi_vax.c
	$(LINK) $(LFLAGS) /exe=$@ pi_vax.obj $(LIBS)


/******************************************************************/
#include <stdio.h>
#include <math.h>
#include <types.h>
#include <time.h>

struct  tbuffer	etime;
long		t1,t2;

#if DODOUBLE
#   define PRECISION double
#else
#   define PRECISION float
#   endif

main(argc,argv)
char	**argv;
    {
    int		i,last,incr,sgn;
    PRECISION   pi,div;

    if (argc > 1)   last = atoi(argv[1]);
    else	    last = 100000;
    if (argc > 2)   incr = atoi(argv[2]);
    else	    incr = 10000;

    pi  = (PRECISION)0.0;
    div = (PRECISION)1.0;
    sgn = 0;

    times(&etime);
    t1 = etime.proc_user_time;
    for (i=0; i<last; i++) {
	if (sgn) pi -= (PRECISION)4.0  / div;
	else     pi += (PRECISION)4.0  / div;
	sgn = 1 - sgn;
	div += (PRECISION)2.0;
	if (!(i%incr)) {
#	    if DODOUBLE
		printf("%6d: %lf\n",i,(double)pi);
#	    else
		printf("%6d: %f\n",i,(float)pi);
#		endif
	    }
	}
    times(&etime);
    t2	= etime.proc_user_time;
    t2 -= t1;
    t2 *= 1000000;
    t2 /= 60;
    t2 /= last;
    printf("%d usecs per loop\n",t2);
    }


1789.3I'll volunteer the 68000ELWOOD::WHERRYI survived Space Academy Level IITue Oct 18 1988 18:424
    
    Stock amiga 2000 1 meg memory 1 flopy 1 40 meg HD.

    brad
1789.4Any 68881s out there?COOKIE::WECKERGood old 6844A7B7A5000965D0Tue Oct 18 1988 19:1711
re:	.3

Great! Now we just need some 68881s (any starboards out there?)

BTW:	The reason for the rush is that I'm demoing the board at the monthly
	club meeting this week and would like to show some numbers for it.
	Thanks to everyone who's helping out!

Regards,
dave

1789.5questions and answersELWOOD::WHERRYI survived Space Academy Level IIWed Oct 19 1988 00:4538
    
re: .2
    
    were the numbers, cpu seconds used or were those the total times??
    were other people using the VMS vaxes?
    
    brad
    
    perf. results follow:
    
--------------------------------------------------------------------------------
    
Amiga 2000 with 68000 @ 7.16 mhz

	pi_single		      pi_double
run	  usecs		time		usecs		time
---	---------     ----------       ---------      ----------
1	397		39.7 sec	1530		2 min 33.0 sec
2	397		39.7 sec	1536		2 min 33.6 sec
3	397		39.7 sec	1534		2 min 33.4 sec
4 	397		39.7 sec	1530		2 min 33.0 sec
5	397		39.7 sec	1532		2 min 33.2 sec

-------

Best Times:

pi_single 39.7 seconds       pi_double 2 minutes 33.0 seconds

-------

Best PI Aproximations:

pi_single @ 50k loop 3.141640

pi_double @ 90k loop 3.141604
    
1789.6My results...LEDS::ACCIARDIDukakis should pluck his eyebrowsWed Oct 19 1988 08:5828
    
    Hardware:	A2000, 3 megs RAM
    		CMI 14.32 MHz 68000
    		12 MHz 68881
    
    Software:   v 1.3 Gamma-something-or-other, WB 34.4
    
    PI_SINGLE	PI_DOUBLE	PI_68881
    ------------------------------------
    337 uSecs	436 uSecs	GURU (under 1.2 & 1.3)
    
    Comparing my results with PI_DOUBLE with Brad's stock A2000, it
    looks like the CMI board provides some genuine speed with large
    numbers.
    
    I was puzzled by the GURUs when running PI_68881, since I know for
    a fact that my math chip works fine.  I ran some CMI benchmarks
    with and without the math chip installed, and it works like a champ.
    
    As an interesting note, I got virtually the same results (to within a
    microsecond) with MACHII and SNIPIT installed as background tasks.  I
    did not change their priority levels.
    
    Ed.
    
    
    PS:  This is fun stuff! I think I'll run these benchmarks on a CSA
    	 Amiga at the Software Shop. 
1789.7Double precision faster under 1.3NAC::PLOUFFCider Season Has BegunWed Oct 19 1988 10:2018
    Here are some numbers to sow confusion for Amiga pi benchmark results. 
    I ran 3 trials of each test-- times are usec per loop.

    Configuration:  A1000, 512K, 2 drives, OS v1.2, CLI, DMouse 

    Pi_single	 397	 397	 397 
    Pi_double	1527	1529	1530 

    Configuration:  same, except OS v1.3, and AmigaShell replaces CLI 

    Pi_single	 398	 397	 397 
    Pi_double	 777	 761	 760	(!) 

    Looks like the mathieeedoubbas.library has definitely been sped up.  So
    the question I have is, which version of the operating system do you
    use to get fair results? 
    
    Wes
1789.8sorta weird?ELWOOD::WHERRYI survived Space Academy Level IIWed Oct 19 1988 12:308
    
    
    I too was running dmouse whilst generating my numbers.  I tried
    it without running it as well.  (i only did 5 runs for each, but
    all of the fastest numbers came with Dmouse running...fluke?)
    
    brad
    
1789.9Current numbersCOOKIE::WECKERGood old 6844A7B7A5000965D0Wed Oct 19 1988 12:3253
re:	.5

->     were the numbers, cpu seconds used or were those the total times??
->     were other people using the VMS vaxes?

USER CPU-TIME. More people on the VMS-8700 (which should have charged me less
in that case). The uVaxen had the same load.

re: .6 GURU

Have you tried recompiling the 68881 code for your system?

re: .6 .7

Thanks! Here is my current table of info (keep those numbers rolling in)!


===============
Results so far:
===============


	Sys	SINGLE	68020		DOUBLE	68020D	68881	68020C
	-------	-------	-------		-------	-------	-------	------
format:		+ff 	+ff +2		+fi 	+fi +2 	+f8	+f8 +2
lib:		-lm32 	-lm32		-lma32  -lma32	-m832	-m832
	-------	-------	-------		-------	-------	-------	------
Amiga:	1	 397			1527		  ?
	2	 397			 760		  ?
	3	 337			 436		  ?
	4	  ?			  ?		  ?
	5	 323	 266		 981	 932	 169	 128
	6	 326	 268		 990	 920	 136	  97
	7	  ?	  ?		  ?	  ?	  ?	  ?
Vax:	8	  88			  69
	9	  57			  46
	10	  18			  15
	11	  10			   9


Sys	Description
-------	--------------------------------------------------------------
1 	Amiga with 68000 (at 7.16 MHZ) and 68881 (at 7.16 MHZ) O/S 1.2
2 	Amiga with 68000 (at 7.16 MHZ) and 68881 (at 7.16 MHZ) O/S 1.3
3	Amiga with 68000 (at 14.3 MHZ) and 68881 (at 12   MHZ) O/S 1.3
4 	Amiga with 68010 (at 7.16 MHZ) and 68881 (at 7.16 MHZ) O/S 1.2
5 	Amiga with 68020 (at 7.16 MHZ) and 68881 (at 7.16 MHZ) O/S 1.2
6 	Amiga with 68020 (at 7.16 MHZ) and 68881 (at 16   MHZ) O/S 1.2
7 	Amiga with 68020 (at 16   MHZ) and 68881 (at 16   MHZ) O/S 1.2
8 	uVAX-II under VMS
9 	uVAX-II under ULTRIX
10 	VAX8700 under VMS
11 	VAX8700 under ULTRIX
1789.10RAVEN1::EVERHARTWed Oct 19 1988 13:288
    re .1
    
    For some reason, my computer was refusing to download the code.
    I'll try again tonight if it isn't too late.  (I tried for 3 hours).
    It used to work.  ??
    
     - Chris
    
1789.11Let's mix it up a bit!LEDS::ACCIARDIDukakis should pluck his eyebrowsWed Oct 19 1988 13:397
    
    Can someone with an Atari ST or a Mac SE compile and run the benchmark?
    It would be interesting to see which 68000 box is the fastest. 
    I know that the results will probably measure which compiler produces
    the fastest executable, but what the hell, could be fun anyway.
    
    Ed.
1789.12Benchmark ResultsRAVEN1::EVERHARTThu Oct 20 1988 14:2921
    Hardware:
    	Amiga 1000
    	512K  (I'm cheap)
    	2 3.5" drives (1 internal)
    	68010
    
    Software:
    	Kickstart 1.2
    	Workbench 1.2
    
    Results:
    Precision             Run 1       Run 2       Run 3
    ---------             -----       -----       -----
    Single (3.141649)     372 us      372 us      372 us
    Double (3.141604)     1465 us     1450 us     1451 us
    
    
    
    Sorry all of this took so long, but at least I finally got it to
    work.
       
1789.13(late) resultsWJG::GUINEAUSomewhere else in timeFri Oct 21 1988 09:3923
    Hardware:
    	Amiga 500
    	1 MEG
    	68010
    
    Software:
    	Workbench 1.3 GAMMA of some sort
    
	Single 	415 uS   415 uS
	Double 	795 uS   795 uS


It all ran just fine.

Just for comparison here are the numbers during a download of HARRIER.ARC
(BTW - Neat Paul [HARRIER] - I was at that show!)

	Single	841 uS   815 uS
	Double  1579 uS  1173 uS


John