[net.sources] Dhrystone

gemini@homxb.UUCP (Rick Richardson) (12/14/85)

echo shar: extracting makefile;
sed 's/^X//' <<'SHAR_EOF' >makefile
X#
X#	This makefile builds several benchmarks for UNIX
X#	
X#	The BYTE magazine benchmarks are here, as well as iocall,
X#	which came off Usenet, and Dhrystone.
X#
X#	type:	make		#to build all the programs
X#		make run	#to run all of the benchmarks
X#
X#		make run >results 2>&1
X#		make report		#Generates handy summary
X#
X#	collected by Rick Richardson, PC Research, Inc. (201) 922-1134
X#		..!ihnp4!houxm!castor!pcrat!rer
X#	NOTE:	send me the Dhrystone benchmarks results for any new machine
X#		I'll summarize for the next release of dhrystone.
X#
XSHELL=/bin/sh
XFILES=	makefile dry.README\
X	dread.c   fcall.c   float.c   iocall.c loop.c    pipes.c   sieve.c \
X	tst.sh dwrite.c fibo.c    iofile.c  multi.sh  scall.c   bytesort.c \
X	dry.c dryresults.sh gen_rpt
XBYTE=	dwrite dread fcalla fcalle fibo float iofile loop pipes scall \
X	sieve bytesort
XUSENET=	iocall
XDRY=	dryr drynr
XCMDS=	$(BYTE) $(USENET) $(DRY)
X#
X#	-z/-i flags are recommended for Venix
X#
XCFLAGS=-O -s
X#CFLAGS=-O -s -i -z
X
Xall:	$(BYTE) $(USENET) $(DRY)
X
Xclobber:
X	-rm -f $(BYTE) $(USENET) $(DRY)
X
Xbench.shar:	$(FILES)
X	shar $(FILES) > $@
Xfcalle: fcall.c
X	cc $(CFLAGS) -DEMPTY fcall.c -o $@
Xfcalla: fcall.c
X	cc $(CFLAGS) -DASSIGN fcall.c -o $@
Xbytesort:	bytesort.c
X	cc -s -O -i bytesort.c -o $@
Xdryr:	dry.c
X	cc $(CFLAGS) -DREG=register dry.c -o $@
Xdrynr:	dry.c
X	cc $(CFLAGS) dry.c -o $@
X
Xrun:	shells
X	for i in $(CMDS); do echo "$$i:"; time $$i; done
X	@rm -f rfile
X
Xreport:	results
X	gen_rpt results report
X
Xshells:
X	time $(SHELL) tst.sh
X	time $(SHELL) multi.sh 1
X	time $(SHELL) multi.sh 1 2
X	time $(SHELL) multi.sh 1 2 3
X	time $(SHELL) multi.sh 1 2 3 4
X	time $(SHELL) multi.sh 1 2 3 4 5
SHAR_EOF
echo shar: extracting dry.README;
sed 's/^X//' <<'SHAR_EOF' >dry.README
XANNOUNCMENT
XAttached, please find the 11/08/85 list of DHRYSTONE benchmark results.
XThe source code for the drystone benchmark can be found in net.sources.
X
XThe latest list includes many new machines/compiler combinations.  Many
Xof the questionable results have been confirmed or corrected.  I am still
Xwaiting for Intel 386 results; I'm sure many others are, too.
X
XCLARIFICATION
XThere seems to have been a great deal of confusion over what this
Xbenchmark measures, and how to use these results.  Let me try to clarify
Xthis:
X
X	1) DHRYSTONE is a measure of processor+compiler efficiency in
X	   executing a 'typical' program.  The 'typical' program was
X	   designed by measuring statistics on a great number of
X	   'real' programs.  The 'typical' program was then written
X	   by Reinhold P. Weicker using these statistics.  The
X	   program is balanced according to statement type, as well
X	   as data type.
X
X	2) DHRYSTONE does not use floating point.  Typical programs don't.
X
X	3) DHRYSTONE does not do I/O.  Typical programs do, but then
X	   we'd have a whole can of worms opened up.
X
X	4) DHRYSTONE does not contain much code that can be optimized
X	   by vector processors.  That's why a CRAY doesn't look real
X	   fast, they weren't built to do this sort of computing.
X
X	5) DHRYSTONE does not measure OS performance, as it avoids
X	   calling the O.S.  The O.S. is indicated in the results only
X	   to help in identifying the compiler technology.
X
XIf somebody asked me to pick out the best machine for the money, I
Xwouldn't look at just the results of DHRYSTONE.  I'd probably:
X
X	1) Run DHRYSTONE to get a feel for the compiler+processor
X	   speed.
X	2) Run any number of benchmarks to check disk I/O bandwidth,
X	   using both sequential and random read/writes.
X	3) Run a multitasking benchmark to check multi-user response
X	   time.  Typically, these benchmarks run several types of
X	   programs such as editors, shell scripts, sorts, compiles,
X	   and plot the results against the number of simulated users.
X	4) If appropriate for the intended use, run WHETSTONE, to determine
X	   floating point performance.
X	5) If appropriate for intended use, run some programs which do
X	   vector and matrix computations.
X	6) Figure out what the box will:
X		- cost to buy
X		- cost to operate and maintain
X		- be worth when it is sold
X		- be worth if the manufacturer goes out of business
X	7) Having done the above, I probably have a hand-full of
X	   machines which meet my price/performance requirements.
X	   Now, I find out if the applications programs I'd like
X	   to use will run on any of these machines.  I also find
X	   out how much interest people have in writing new software
X	   for the machine, and look carefully at the migration path
X	   I will have to take when I reach the limits of the machine.
X
XTo summarize, DHRYSTONES by themselves are not anything more than
Xa way to win free beers when arguing 'Box-A versus Box-B' religion.
XThey do provide insight into Box-A/Compiler-A versus Box-A/Compiler-B
Xcomparisons.
X
XAs usual, all comments and new results should be mailed directly
Xto me at ..{ihnp4,..others..}!houxm!castor!rer.  I will summarize
Xand post to the net.
X
XRick Richardson
XPC Research, Inc.
X(201) 834-1378
X..!houxm!castor!rer
SHAR_EOF
echo shar: extracting dread.c;
sed 's/^X//' <<'SHAR_EOF' >dread.c
X#include <stdio.h>
X#define BLOCKS 256
Xlong lseek();
X
Xmain()
X{
X	char buffer[512];
X	char	*filename = "a_large_file";
X	register int i;
X	int	fildes;
X	long	int offset;
X	if ((fildes = open(filename, 0)) < 0) {
X		printf("Cannot find '%s'. Run 'dwrite' first.\n", filename);
X		exit(1);
X	}
X	for (i = 0; i < BLOCKS; ++i)
X	{
X#ifdef SIXTEEN
X		offset = (long) rand() * 4L;
X#endif
X#ifdef THIRTYTWO
X		offset = (long) rand() / 16384L;
X#endif
X		if (lseek(fildes, offset, 0) < 0) {
X			printf("Lseek to %ld failed i=%d\n", offset, i);
X			exit (1);
X		}
X		if (read(fildes, buffer, 512) < 0) {
X			printf("Error reading block at byte %ld\n", offset);
X			exit (1);
X		}
X	}
X	unlink(filename);
X	exit(0);
X}
SHAR_EOF
echo shar: extracting fcall.c;
sed 's/^X//' <<'SHAR_EOF' >fcall.c
X#define TIMES 50000
Xmain()
X#ifdef EMPTY
X{
X	register unsigned int i,j;
X	for (i = 0; i < TIMES; ++i)
X		j = empty(i);
X	exit(0);
X}
Xempty(k)
Xregister unsigned int k;
X{
X	return (k);
X}
X#endif
X#ifdef ASSIGN
X{
X	register unsigned int i,j;
X	for (i = 0; i < TIMES; ++i)
X		j = i;
X	exit(0);
X}
X#endif
SHAR_EOF
echo shar: extracting float.c;
sed 's/^X//' <<'SHAR_EOF' >float.c
X#define CONST1	3.141597E0
X#define CONST2	1.7839032E4
X#define	COUNT	10000
X#define REG	
X
Xmain()
X{
X	double	a, b, c;
X	REG int	i;
X
X	a = CONST1;
X	b = CONST2;
X	for (i = 0; i < COUNT; ++i)
X	{
X		c = a * b;
X		c = c / a;
X		c = a * b;
X		c = c / a;
X		c = a * b;
X		c = c / a;
X		c = a * b;
X		c = c / a;
X		c = a * b;
X		c = c / a;
X		c = a * b;
X		c = c / a;
X		c = a * b;
X		c = c / a;
X	}
X	printf("Done\n");
X	exit(0);
X}
SHAR_EOF
echo shar: extracting iocall.c;
sed 's/^X//' <<'SHAR_EOF' >iocall.c
X/* iocall.c:
X *
X *	Author: 	Jan Stubbs, NCR, ..!sdcsvax!ncr-sd!stubbs
X *	Results:	Send results to the above author.
X *	Version:	improved to eliminate real disk writes
X *
X * This benchmark tests speed of Unix system call interface
X * and speed of cpu doing common Unix io system calls.
X *
X * Under normal circumstances, this benchmark will not actually
X * cause any physical disk activity, but will just cause system
X * buffer activity.
X */
X
Xchar buf[512];
Xint fd,count,i,j;
X
Xmain()
X{
X	fd = creat("/tmp/testfile",0777);
X	close(fd);
X	fd = open("/tmp/testfile",2);
X	unlink("/tmp/testfile");
X	for (i=0;i<=1000;i++) {
X		lseek(fd,0,0);
X		count = write(fd,buf,500);
X		lseek(fd,0,0);
X		for (j=0;j<=3;j++) 
X			count = read(fd,buf,100);
X	}
X	exit(0);
X}
SHAR_EOF
echo shar: extracting loop.c;
sed 's/^X//' <<'SHAR_EOF' >loop.c
Xmain()
X{
X	long i;
X	for (i=0; i <1000000L; ++i)
X		;
X	exit(0);
X}
SHAR_EOF
echo shar: extracting pipes.c;
sed 's/^X//' <<'SHAR_EOF' >pipes.c
X#define BLOCKS 1024
Xchar buffer[512];
Xint	fid[2];
Xmain()
X{
X	register int i;
X	pipe(fid);
X	if (fork()){
X		for (i = 0; i < BLOCKS; ++i)
X			if (write(fid[1], buffer, 512) < 0)
X				printf("Error in writing; i=%d\n", i);
X		if (close(fid[1]) != 0)
X			printf("Error in parent closing\n");
X	}
X	else {
X		if (close(fid[1]) != 0)
X			printf("Error in child closing\n");
X		for(;;)
X			if (read(fid[0], buffer, 512) == 0) {
X				break;
X			}
X	}
X	exit(0);
X}
SHAR_EOF
echo shar: extracting sieve.c;
sed 's/^X//' <<'SHAR_EOF' >sieve.c
X#define TRUE 1
X#define FALSE 0
X#define SIZE 8190
X#define REG	register
X
Xchar	flags[SIZE+1];
X
Xmain()
X{
X	REG int		i, prime, k, count, iter;
X
X/*	printf("10 iterations\n");*/
X	for (iter = 1; iter <= 10; ++iter)
X	{
X		count = 0;
X		for (i = 0; i <= SIZE; ++i)
X			flags[i] = TRUE;
X		for (i = 0; i <= SIZE; ++i)
X		{
X			if (flags[i])
X			{
X				prime = i + i + 3;
X				for (k = i + prime; k <= SIZE; k+= prime)
X					flags[k] = FALSE;
X				++count;
X			}
X		}
X	}
X/*	printf("%d primes\n", count);*/
X	exit(0);
X}
SHAR_EOF
echo shar: extracting tst.sh;
sed 's/^X//' <<'SHAR_EOF' >tst.sh
Xsort >sort.$$ <<EOF
XNow
Xis
Xthe
Xtime
Xfor
Xall
Xgood
Xmen
Xto
Xcome
Xto
Xthe
Xaid
Xof
Xtheir
Xcountry
XEOF
Xod sort.$$ | sort -n +1 > od.$$
Xgrep the sort.$$ | tee grep.$$ | wc > wc.$$
Xrm sort.$$ grep.$$ od.$$ wc.$$
SHAR_EOF
echo shar: extracting dwrite.c;
sed 's/^X//' <<'SHAR_EOF' >dwrite.c
X#include <stdio.h>
X#define BLOCKS 256
Xmain()
X{
X	char buffer[512];
X	char	*filename = "a_large_file";
X	register int i;
X	int	fildes;
X	if ((fildes = creat(filename, 0640)) < 0) {
X		printf("Cannot create file\n");
X		exit(1);
X	} else {
X		close(fildes);
X		if ((fildes = open(filename, 1)) < 0) {
X			printf("Cannot open file\n");
X			exit(1);
X		}
X	}
X	for (i = 0; i < BLOCKS; ++i)
X		if (write(fildes, buffer, 512) < 0) {
X			printf("Error writing block %d\n", i);
X			exit (1);
X		}
X	close(fildes);
X	exit(0);
X}
SHAR_EOF
echo shar: extracting fibo.c;
sed 's/^X//' <<'SHAR_EOF' >fibo.c
X#define NTIMES	10
X#define	NUMBER	24
X#define	REG	register
X
Xmain()
X{
X	REG int		i;
X	REG unsigned	value;
X	unsigned	fib();
X
X	printf("%d iterations: ", NTIMES);
X
X	for (i = 1; i <= NTIMES; ++i)
X		value = fib(NUMBER);
X
X	printf("fibonacci(%d) = %u.\n", NUMBER, value);
X	exit(0);
X}
X
Xunsigned fib(x)
Xint	x;
X{
X	if (x > 2)
X		return (fib(x-1) + fib(x-2));
X	else
X		return (1);
X}
SHAR_EOF
echo shar: extracting iofile.c;
sed 's/^X//' <<'SHAR_EOF' >iofile.c
X#define ERROR	-1
X#define READERR	0
X
X#define	BEG	0
X#define	CURR	1
X#define	END	2
X#define	READ	0
X#define	WRITE	1
X#define	UPDATE	2
X
X#define	OKCLOSE	0
X#define	FILESIZE	65000L
X#define	COUNT	500
X
X#define	C	13849L
X#define	A	25173L
X#define	ODDNUM	23
X#define	REG
Xlong	seed = 7L;
X
Xlong	random(), lseek();
X
Xmain(argc, argv)
Xint	argc;
Xchar	*argv[];
X{
X	int	i;
X	REG long	j;
X	long		pos;
X	int	fd;
X	char	buffer[512];
X
X	if (argc == 1) argv[1] = "rfile";
X	if ((fd = creat(argv[1], 0666)) == ERROR)
X		abort("Can't create data file\n");
X	else	printf("File opened for sequential writing\n");
X	for (j = 0; j < sizeof(buffer); ++j) buffer[j] = 'x';
X	for (j = FILESIZE; j > 0; j -= sizeof(buffer))
X		if (write(fd, buffer,  (j > 512) ? 512 : j) == ERROR)
X			abort("Unexpected EOF in writing data file\n");
X	if (close(fd) != OKCLOSE)
X		abort("Error closing data file\n");
X	else
X		printf("Normal termination writing data file\n");
X	if ((fd = open(argv[1], UPDATE)) == ERROR)
X		abort("Can't open data file for random reading and writing\n");
X	else	printf("File opened for random reading and writing\n");
X	for (i = 0; i < COUNT; ++i)
X	{
X		j = random(FILESIZE);
X		if (j < 0L)
X			j = -j;
X		if (FILESIZE - j < ODDNUM)
X			continue;
X		if ((pos = lseek(fd, j, BEG)) == -1L)
X			abort("Error seeking to random offset\n");
X		if (read(fd, buffer, ODDNUM) == READERR)
X			abort("Error reading at random offset\n");
X		j = random(FILESIZE);
X		if (j < 0L)
X			j = -j;
X		if (FILESIZE - j < ODDNUM)
X			continue;
X		if ((pos = lseek(fd, j, BEG)) == -1L)
X			abort("Error seeking to random offset\n");
X		if (write(fd, buffer, ODDNUM) == READERR)
X			abort("Error writing at random offset\n");
X	}
X	if (close(fd) != OKCLOSE)
X		abort("Error closing data file\n");
X	else
X		printf("Normal termination from random reading and writing\n");
X	exit(0);
X}
X
Xlong	random(size)
Xlong	size;
X{
X	seed = seed * A + C;
X	return (seed % size);
X}
Xabort(message)
Xchar	*message;
X{
X	printf(message);
X	exit(ERROR);
X}
SHAR_EOF
echo shar: extracting multi.sh;
sed 's/^X//' <<'SHAR_EOF' >multi.sh
Xfor i
Xdo
X	echo $i
X	/bin/sh tst.sh &
Xdone
Xwait
SHAR_EOF
echo shar: extracting scall.c;
sed 's/^X//' <<'SHAR_EOF' >scall.c
X#define TIMES 25000
X
Xmain()
X{
X	register int i;
X	for (i = 0; i < TIMES; ++i)
X		getpid();
X	exit(0);
X}
SHAR_EOF
echo shar: extracting bytesort.c;
sed 's/^X//' <<'SHAR_EOF' >bytesort.c
X#define	REG	register
X#define MAXNUM	1000
X#define	COUNT	10
X#define	MODULUS	((long) 0x20000)
X
X#define	C	13849L
X#define	A	25173L
X
Xlong	seed = 7L;
X
Xlong	random();
X
Xlong	buffer[MAXNUM] = {0};
X
Xmain()
X{
X	REG int		i, j;
X	long	temp;
X
X	printf("Filling array and sorting %d times\n", COUNT);
X	for (i = 0; i < COUNT; ++i)
X	{
X		for (j = 0; j < MAXNUM; ++j)
X		{
X			temp = random(MODULUS);
X			if (temp < 0L)
X				temp = -temp;
X			buffer[j] = temp;
X		}
X		printf("Buffer full, iteration %d\n", i);
X		quick(0, MAXNUM, buffer);
X	}
X	printf("Done\n");
X	exit(0);
X}
X
Xquick(lo, hi, base)
Xint	lo, hi;
Xlong	base[];
X{
X	REG int		i, j;
X	long		pivot, temp;
X
X	if (lo < hi)
X	{
X		for (i = lo, j = hi, pivot = base[hi]; i < j; )
X		{
X			while (i < j && base[i] < pivot)
X				++i;
X			while (j > i && base[j] > pivot)
X				--j;
X			if (i < j)
X			{
X				temp = base[i];
X				base[i] = base[j];
X				base[j] = temp;
X			}
X		}
X		temp = base[i];
X		base[i] = base[hi];
X		base[hi] = temp;
X		quick(lo, i - 1, base);
X		quick(i + 1, hi, base);
X	}
X}
X
Xlong random(size)
Xlong	size;
X{
X	seed = seed * A + C;
X	return (seed % size);
X}
SHAR_EOF
echo shar: extracting dry.c;
sed 's/^X//' <<'SHAR_EOF' >dry.c
X/*
X *	"DHRYSTONE" Benchmark Program
X *
X *	Version:	C/1, 12/01/84
X *
X *	Date:		PROGRAM updated 11/02/85, RESULTS updated 12/13/85
X *
X *	Author:		Reinhold P. Weicker,  CACM Vol 27, No 10, 10/84 pg. 1013
X *			Translated from ADA by Rick Richardson
X *			Every method to preserve ADA-likeness has been used,
X *			at the expense of C-ness.
X *
X *	Compile:	cc -O dry.c -o drynr			: No registers
X *			cc -O -DREG=register dry.c -o dryr	: Registers
X *
X *	Defines:	Defines are provided for old C compiler's
X *			which don't have enums, and can't assign structures.
X *			The time(2) function is library dependant; Most
X *			return the time in seconds, but beware of some, like
X *			Aztec C, which return other units.
X *			The LOOPS define is initially set for 50000 loops.
X *			If you have a machine with large integers and is
X *			very fast, please change this number to 500000 to
X *			get better accuracy.  Please select the way to
X *			measure the execution time using the TIME define.
X *			For single user machines, time(2) is adequate. For
X *			multi-user machines where you cannot get single-user
X *			access, use the times(2) function.  If you have
X *			neither, use a stopwatch in the dead of night.
X *			Use a "printf" at the point marked "start timer"
X *			to begin your timings. DO NOT use the UNIX "time(1)"
X *			command, as this will measure the total time to
X *			run this program, which will (erroneously) include
X *			the time to malloc(3) storage and to compute the
X *			time it takes to do nothing.
X *
X *	Run:		drynr; dryr
X *
X *	Results:	If you get any new machine/OS results, please send to:
X *
X *				{ihnp4,vax135,..}!houxm!castor!pcrat!rer
X *
X *			and thanks to all that do.  Space prevents listing
X *			the names of those who have provided some of these
X *			results.
X *
X *	Note:		I order the list in increasing performance of the
X *			"with registers" benchmark.  If the compiler doesn't
X *			provide register variables, then the benchmark
X *			is the same for both REG and NOREG.  I'm not going
X *			to list a compiler in a better place because if it
X *			had register variables it might do better. No
X *			register variables is a big loss in my book.
X *
X *	PLEASE:		Send complete information about the machine type,
X *			clock speed, OS and C manufacturer/version.  If
X *			the machine is modified, tell me what was done.
X *			On UNIX, execute uname -a and cc -V to get this info.
X *
X *	80x8x NOTE:	80x8x benchers: please try to do all memory models
X *			for a particular compiler.
X *
X *--------------------------------RESULTS BEGIN--------------------------------
X *
X * MACHINE	MICROPROCESSOR	OPERATING	COMPILER	DHRYSTONES/SEC.
X * TYPE				SYSTEM				NO REG	REGS
X * --------------------------	------------	-----------	---------------
X * Commodore 64	6510-1MHz	C64 ROM		C Power 2.8	  36	  36
X * HP-110	8086-5.33Mhz	MSDOS 2.11	Lattice 2.14	 284	 284
X * IBM PC/XT	8088-4.77Mhz	PC/IX		cc		 257	 287
X * P-E 3205	?		Xelos(SVR2) 	cc		 279	 296
X * Perq-II	2901 bitslice	Accent S5c 	cc (CMU)	 301	 301
X * IBM PC/XT	8088-4.77Mhz	COHERENT 2.3.43	MarkWilliams cc  296	 317
X * Cosmos	68000-8Mhz	UniSoft		cc		 305	 322
X * IBM PC/XT	8088-4.77Mhz	Venix/86 2.0	cc		 297	 324
X * DEC PRO 350  11/23           Venix/PRO SVR2  cc               299     325
X * PC/XT        8088-4.77Mhz    Venix/86 SYS V  cc               339     377
X * IBM PC	8088-4.77Mhz	MSDOS 2.0	b16cc 2.0	 310	 340
X * Commodore Amiga		?		Lattice 3.02	 368	 371
X * IBM PC	8088-4.77Mhz	MSDOS 2.0	CI-C86 2.20M	 390	 390
X * IBM PC/XT	8088-4.77Mhz	PCDOS 2.1	Wizard 2.1	 367	 403
X * IBM PC/XT	8088-4.77Mhz	PCDOS 3.1	Lattice 2.15	 403	 403 @
X * IBM PC	8088-4.77Mhz	PCDOS 3.1	Datalight 1.10	 416	 416
X * IBM PC/XT	8088-4.77Mhz	PCDOS 2.1	Microsoft 3.0	 390	 427
X * PDP-11/34	-		UNIX V7M	cc		 387	 438
X * IBM PC	8088, 4.77mhz	PC-DOS 2.1	Aztec C v3.2d	 423	 454
X * Tandy 1000	V20, 4.77mhz	MS-DOS 2.11	Aztec C v3.2d	 423	 458
X * PDP-11/34	-		RSTS/E		decus c		 438	 495
X * Onyx C8002	Z8000-4Mhz	IS/1 1.1 (V7)	cc		 476	 511
X * Perkin-Elmer 3230		Xelos (SysV.2)	cc		 507	 565
X * DEC PRO 380  11/73           Venix/PRO SVR2  cc               577     628
X * FHL QT+	68000-10Mhz	Os9/68000	version 1.3	 603	 649 FH
X * Apollo DN550	68010-?Mhz	AegisSR9/IX	cc 3.12		 666	 666
X * HP-110	8086-5.33Mhz	MSDOS 2.11	Aztec-C		 641	 676 
X * ATT PC6300	8086-8Mhz	MSDOS 2.11	b16cc 2.0	 632	 684
X * IBM PC/AT	80286-6Mhz	PCDOS 3.0	CI-C86 2.1	 666	 684
X * Tandy 6000	68000-8Mhz	Xenix 3.0	cc		 694	 694
X * IBM PC/AT	80286-6Mhz	Xenix 3.0	cc		 684	 704 MM
X * Macintosh	68000-7.8Mhz 2M	Mac Rom		Mac C 32 bit int 694	 704
X * Macintosh	68000-7.7Mhz	-		MegaMax C 2.0	 661	 709
X * IBM PC/AT	80286-6Mhz	Xenix 3.0	cc		 704	 714 LM
X * Codata 3300	68000-8Mhz	UniPlus+ (v7)	cc		 678	 725
X * Cadmus 9000	68010-10Mhz	UNIX		cc		 714	 735
X * AT&T 6300    8086-8Mhz       Venix/86 SVR2   cc               668     743
X * Cadmus 9790	68010-10Mhz 1MB	SVR0,Cadmus3.7	cc		 720	 747
X * NEC PC9801F	8086-8Mhz	PCDOS 2.11	Lattice 2.15	 768	  -  @
X * ATT PC6300	8086-8Mhz	MSDOS 2.11	CI-C86 2.20M	 769	 769
X * Burroughs XE550 68010-10Mhz	Centix 2.10	cc		 769	 769 CT1
X * EAGLE/TURBO  8086-8Mhz       Venix/86 SVR2   cc               696     779
X * ALTOS 586	8086-10Mhz	Xenix 3.0b	cc 		 724	 793
X * DEC 11/73	J-11 micro	Ultrix-11 V3.0	System V	 735	 793
X * ATT 3B2/300	WE32000-?Mhz	UNIX 5.0.2	cc		 735	 806
X * Apollo DN320	68010-?Mhz	AegisSR9/IX	cc 3.12		 806	 806
X * IRIS-2400	68010-10Mhz	UNIX System V	cc		 772	 829
X * Atari 520ST  68000-8Mhz      TOS             DigResearch      839     846
X * IBM PC/AT	80286-6Mhz	PCDOS 3.0	MS 3.0(large)	 833	 847 LM
X * VAX 11/750	-		Ultrix 1.1	4.2BSD cc	 781	 862
X * P-E  7350A	68000-8MHz	UniSoft V.2	cc		 821	 875
X * VAX 11/750	-		UNIX 4.2bsd	cc		 862	 877
X * Fast Mac	68000-7.7Mhz	-		MegaMax C 2.0	 839	 904 +
X * IBM PC/XT	8086-9.54Mhz	PCDOS 3.1	Microsoft 3.0	 833	 909 C1
X * DEC 11/44			Ultrix-11 V3.0	System V	 862	 909
X * Macintosh	68000-7.8Mhz 2M	Mac Rom		Mac C 16 bit int 877	 909 S
X * P-E 3210	?		Xelos R01(SVR2)	cc		 849	 924
X * P-E 3220	?               Ed. 7 v2.3      cc		 892	 925
X * IBM PC/AT	80286-6Mhz	Xenix 3.0	cc -i		 909	 925
X * AT&T 6300	8086, 8mhz	MS-DOS 2.11	Aztec C v3.2d	 862	 943
X * IBM PC/AT	80286-6Mhz	Xenix 3.0	cc		 892	 961
X * VAX 11/750	w/FPA		Eunice 3.2	cc		 914	 976
X * IBM PC/XT	8086-9.54Mhz	PCDOS 3.1	Wizard 2.1	 892	 980 C1
X * IBM PC/XT	8086-9.54Mhz	PCDOS 3.1	Lattice 2.15	 980	 980 C1
X * Plexus P35	68000-10Mhz	UNIX System III cc		 984	 980
X * PDP-11/73	KDJ11-AA 15Mhz	UNIX V7M 2.1	cc		 862     981
X * VAX 11/750	w/FPA		UNIX 4.3bsd	cc		 994	 997
X * IRIS-1400	68010-10Mhz	UNIX System V	cc		 909	1000
X * IBM PC/AT	80286-6Mhz	Venix/86 2.1	cc		 961	1000
X * IBM PC/AT	80286-6Mhz	PCDOS 3.0	b16cc 2.0	 943	1063
X * Zilog S8000/11 Z8001-5.5Mhz	Zeus 3.2	cc		1011	1084
X * NSC ICM-3216 NSC 32016-10Mhz	UNIX SVR2	cc		1041	1084
X * IBM PC/AT	80286-6Mhz	PCDOS 3.0	MS 3.0(small)	1063	1086
X * VAX 11/750	w/FPA		VMS		VAX-11 C 2.0	 958	1091
X * Stride	68000-10Mhz	System-V/68	cc		1041	1111
X * ATT PC7300	68010-10Mhz	UNIX 5.2	cc		1041	1111
X * P-E 3230	?		Xelos R01(SVR2)	cc		1040	1126
X * Stride	68000-12Mhz	System-V/68	cc		1063	1136
X * IBM PC/AT    80286-6Mhz      Venix/286 SVR2  cc              1056    1149
X * IBM PC/AT	80286-6Mhz	PCDOS 3.0	Datalight 1.10	1190	1190
X * ATT PC6300+	80286-6Mhz	MSDOS 3.1	b16cc 2.0	1111	1219
X * IBM PC/AT	80286-6Mhz	PCDOS 3.1	Wizard 2.1	1136	1219
X * Sun2/120	68010-10Mhz	Sun 4.2BSD	cc		1136	1219
X * IBM PC/AT	80286-6Mhz	PCDOS 3.0	CI-C86 2.20M	1219	1219
X * MASSCOMP 500	68010-10MHz	RTU V3.0	cc (V3.2)	1156	1238
X * Cyb DataMate	68010-12.5Mhz	Uniplus 5.0	Unisoft cc	1162	1250
X * PDP 11/70	-		UNIX 5.2	cc		1162	1250
X * IBM PC/AT	80286-6Mhz	PCDOS 3.1	Lattice 2.15	1250	1250
X * IBM PC/AT	80286-7.5Mhz	Venix/86 2.1	cc		1190	1315 *15
X * Sun2/120	68010-10Mhz	Standalone	cc		1219	1315
X * Intel 380	80286-8Mhz	Xenix R3.0up1	cc		1250	1315 *16
X * ATT 3B2/400	WE32100-?Mhz	UNIX 5.2	cc		1315	1315
X * P-E 3250XP	-		Xelos R01(SVR2)	cc		1215	1318
X * DG MV4000	-		AOS/VS 5.00	cc		1333	1333
X * IBM PC/AT	80286-8Mhz	Venix/86 2.1	cc		1275	1380 *16
X * IBM PC/AT	80286-6Mhz	MSDOS 3.0	Microsoft 3.0	1250	1388
X * ATT PC6300+	80286-6Mhz	MSDOS 3.1	CI-C86 2.20M	1428	1428
X * COMPAQ/286   80286-8Mhz      Venix/286 SVR2  cc              1326    1443
X * IBM PC/AT    80286-7.5Mhz    Venix/286 SVR2  cc              1333    1449 *15
X * Cyb DataMate	68010-12.5Mhz	Uniplus 5.0	Unisoft cc	1470	1562 S
X * VAX 11/780	-		UNIX 5.2	cc		1515	1562
X * MicroVAX-II	-		-		-		1562	1612
X * VAX 11/780	-		UNIX 4.3bsd	cc		1646	1662
X * Apollo DN660	-		AegisSR9/IX	cc 3.12		1666	1666
X * ATT 3B20	-		UNIX 5.2	cc		1515	1724
X * NEC PC-98XA	80286-8Mhz	PCDOS 3.1	Lattice 2.15	1724	1724 @
X * HP9000-500	B series CPU	HP-UX 4.02	cc		1724	-
X * IBM PC/STD	80286-8Mhz	MSDOS 3.0 	Microsoft 3.0	1724	1785 C2
X * DEC-2065	KL10-Model B	TOPS-20 6.1FT5	Port. C Comp.	1937	1946
X * Gould PN6005	-		UTX 1.1(4.2BSD)	cc		1675	1964
X * DEC2060	KL-10		TOPS-20		cc		2000	2000 &
X * VAX 11/785	-		UNIX 5.2	cc		2083	2083
X * VAX 11/785	-		VMS		VAX-11 C 2.0	2083	2083
X * VAX 11/785	-		UNIX SVR2	cc		2123	2083
X * VAX 11/785	-		UNIX 4.3bsd	cc		2135	2136
X * Pyramid 90x	-		OSx 2.3		cc		2272	2272
X * Pyramid 90x	FPA,cache,4Mb	OSx 2.5		cc no -O	2777	2777
X * Alliant FX-8 CE		?		?		2622	2901 FX
X * Pyramid 90x	w/cache		OSx 2.5		cc w/-O		3333	3333
X * IBM-4341-II	-		VM/SP3		Waterloo C 1.2  3333	3333
X * IRIS-2400T	68020-16.67Mhz	UNIX System V	cc		3105	3401
X * SUN 3/75	68020-16.67Mhz	SUN 4.2 V3	cc		3333	3571
X * IBM-4341	Model 12	UTS 5.0		?		3685	3685
X * SUN-3/160    68020-16.67Mhz  Sun 4.2 V3.0A   cc		3381    3764
X * Sun 3/180	68020-16.67Mhz	Sun 4.2		cc		3333	3846
X * IBM-4341	Model 12	UTS 5.0		?		3910	3910 MN
X * MC 5400	68020-16.67MHz	RTU V3.0	cc (V4.0)	3952	4054
X * NCR Tower32  68020-16.67Mhz  SYS 5.0 Rel 2.0 cc              3846	4545
X * Gould PN9080	-		UTX-32 1.1c	cc		-	4629
X * MC 5600/5700	68020-16.67MHz	RTU V3.0	cc (V4.0)	4504	4746 %
X * Gould 1460-342 ECL proc      UTX/32 1.1/c    cc              5342    5677 G1
X * VAX 8600	-		UNIX 4.3bsd	cc		7024	7088
X * VAX 8600	-		VMS		VAX-11 C 2.0	7142	7142
X * CCI POWER 6/32		COS(SV+4.2)	cc		7500	7800
X * CCI POWER 6/32		POWER 6 UNIX/V	cc		8236	8498
X * CCI POWER 6/32		4.2 Rel. 1.2b	cc		8963	9544
X * Sperry (CCI Power 6)		4.2BSD		cc		9345   10000
X * CRAY-X-MP/12	   105Mhz	COS 1.14	Cray C         10204   10204
X * IBM-3083	-		UTS 5.0 Rel 1	cc	       16666   12500
X * CRAY-1A	    80Mhz	CTSS		Cray C 2.0     12100   13888
X * IBM-3083	-		VM/CMS HPO 3.4	Waterloo C 1.2 13889   13889
X * Amdahl 470 V/8 		UTS/V 5.2       cc v1.23       15560   15560
X * CRAY-X-MP/48	   105Mhz	CTSS		Cray C 2.0     15625   17857
X * Amdahl 580	-		UTS 5.0 Rel 1.2	cc v1.5        23076   23076
X * Amdahl 5860	 		UTS/V 5.2       cc v1.23       28970   28970
X *
X *   *   Crystal changed from 'stock' to listed value.
X *   +   This Macintosh was upgraded from 128K to 512K in such a way that
X *       the new 384K of memory is not slowed down by video generator accesses.
X *   %   Single processor; MC == MASSCOMP
X *   &   A version 7 C compiler written at New Mexico Tech.
X *   @   vanilla Lattice compiler used with MicroPro standard library
X *   S   Shorts used instead of ints
X *   LM  Large Memory Model. (Otherwise, all 80x8x results are small model)
X *   MM  Medium Memory Model. (Otherwise, all 80x8x results are small model)
X *   C1  Univation PC TURBO Co-processor; 9.54Mhz 8086, 640K RAM
X *   C2  Seattle Telecom STD-286 board
X *   C?  Unknown co-processor board?
X *   CT1 Convergent Technologies MegaFrame, 1 processor.
X *   MN  Using Mike Newtons 'optimizer' (see net.sources).
X *   G1  This Gould machine has 2 processors and was able to run 2 dhrystone
X *       Benchmarks in parallel with no slowdown.
X *   FH  FHC == Frank Hogg Labs (Hazelwood Uniquad 2 in an FHL box).
X *   FX  The FX-8 has two kinds of processors.  This figure is for CE's
X *	 (computation engines).  The other processor type is an IP (interactive
X *	 processor) which is a 68010-12Mhz. Figures were not precisely
X *	 determined for the IP.
X *   ?   I don't trust results marked with '?'.  These were sent to me with
X *       either incomplete info, or with times that just don't make sense.
X *	 ?? means I think the performance is too poor, ?! means too good.
X *       If anybody can confirm these figures, please respond.
X *
X *--------------------------------RESULTS END----------------------------------
X *
X *	The following program contains statements of a high-level programming
X *	language (C) in a distribution considered representative:
X *
X *	assignments			53%
X *	control statements		32%
X *	procedure, function calls	15%
X *
X *	100 statements are dynamically executed.  The program is balanced with
X *	respect to the three aspects:
X *		- statement type
X *		- operand type (for simple data types)
X *		- operand access
X *			operand global, local, parameter, or constant.
X *
X *	The combination of these three aspects is balanced only approximately.
X *
X *	The program does not compute anything meaningfull, but it is
X *	syntactically and semantically correct.
X *
X */
X
X/* Accuracy of timings and human fatigue controlled by next two lines */
X#define LOOPS	50000		/* Use this for slow or 16 bit machines */
X/*#define LOOPS	500000		/* Use this for faster machines */
X
X/* Compiler dependent options */
X#undef	NOENUM			/* Define if compiler has no enum's */
X#undef	NOSTRUCTASSIGN		/* Define if compiler can't assign structures */
X/* define only one of the next two defines */
X#define TIMES			/* Use times(2) time function */
X/*#define TIME			/* Use time(2) time function */
X
X/* define the granularity of your times(2) function (when used) */
X#define HZ	60		/* times(2) returns 1/60 second (most) */
X/*#define HZ	100		/* times(2) returns 1/100 second (WECo) */
X
X
X
X#ifdef	NOSTRUCTASSIGN
X#define	structassign(d, s)	memcpy(&(d), &(s), sizeof(d))
X#else
X#define	structassign(d, s)	d = s
X#endif
X
X#ifdef	NOENUM
X#define	Ident1	1
X#define	Ident2	2
X#define	Ident3	3
X#define	Ident4	4
X#define	Ident5	5
Xtypedef int	Enumeration;
X#else
Xtypedef enum	{Ident1, Ident2, Ident3, Ident4, Ident5} Enumeration;
X#endif
X
Xtypedef int	OneToThirty;
Xtypedef int	OneToFifty;
Xtypedef char	CapitalLetter;
Xtypedef char	String30[31];
Xtypedef int	Array1Dim[51];
Xtypedef int	Array2Dim[51][51];
X
Xstruct	Record
X{
X	struct Record		*PtrComp;
X	Enumeration		Discr;
X	Enumeration		EnumComp;
X	OneToFifty		IntComp;
X	String30		StringComp;
X};
X
Xtypedef struct Record 	RecordType;
Xtypedef RecordType *	RecordPtr;
Xtypedef int		boolean;
X
X#define	NULL		0
X#define	TRUE		1
X#define	FALSE		0
X
X#ifndef REG
X#define	REG
X#endif
X
Xextern Enumeration	Func1();
Xextern boolean		Func2();
X
X#ifdef TIMES
X#include <sys/types.h>
X#include <sys/times.h>
X#endif
X
Xmain()
X{
X	Proc0();
X	exit(0);
X}
X
X/*
X * Package 1
X */
Xint		IntGlob;
Xboolean		BoolGlob;
Xchar		Char1Glob;
Xchar		Char2Glob;
XArray1Dim	Array1Glob;
XArray2Dim	Array2Glob;
XRecordPtr	PtrGlb;
XRecordPtr	PtrGlbNext;
X
XProc0()
X{
X	OneToFifty		IntLoc1;
X	REG OneToFifty		IntLoc2;
X	OneToFifty		IntLoc3;
X	REG char		CharLoc;
X	REG char		CharIndex;
X	Enumeration	 	EnumLoc;
X	String30		String1Loc;
X	String30		String2Loc;
X	extern char		*malloc();
X
X#ifdef TIME
X	long			time();
X	long			starttime;
X	long			benchtime;
X	long			nulltime;
X	register unsigned int	i;
X
X	starttime = time( (long *) 0);
X	for (i = 0; i < LOOPS; ++i);
X	nulltime = time( (long *) 0) - starttime; /* Computes o'head of loop */
X#endif
X#ifdef TIMES
X	time_t			starttime;
X	time_t			benchtime;
X	time_t			nulltime;
X	struct tms		tms;
X	register unsigned int	i;
X
X	times(&tms); starttime = tms.tms_utime;
X	for (i = 0; i < LOOPS; ++i);
X	times(&tms);
X	nulltime = tms.tms_utime - starttime; /* Computes overhead of looping */
X#endif
X
X	PtrGlbNext = (RecordPtr) malloc(sizeof(RecordType));
X	PtrGlb = (RecordPtr) malloc(sizeof(RecordType));
X	PtrGlb->PtrComp = PtrGlbNext;
X	PtrGlb->Discr = Ident1;
X	PtrGlb->EnumComp = Ident3;
X	PtrGlb->IntComp = 40;
X	strcpy(PtrGlb->StringComp, "DHRYSTONE PROGRAM, SOME STRING");
X
X/*****************
X-- Start Timer --
X*****************/
X#ifdef TIME
X	starttime = time( (long *) 0);
X#endif
X#ifdef TIMES
X	times(&tms); starttime = tms.tms_utime;
X#endif
X	for (i = 0; i < LOOPS; ++i)
X	{
X
X		Proc5();
X		Proc4();
X		IntLoc1 = 2;
X		IntLoc2 = 3;
X		strcpy(String2Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
X		EnumLoc = Ident2;
X		BoolGlob = ! Func2(String1Loc, String2Loc);
X		while (IntLoc1 < IntLoc2)
X		{
X			IntLoc3 = 5 * IntLoc1 - IntLoc2;
X			Proc7(IntLoc1, IntLoc2, &IntLoc3);
X			++IntLoc1;
X		}
X		Proc8(Array1Glob, Array2Glob, IntLoc1, IntLoc3);
X		Proc1(PtrGlb);
X		for (CharIndex = 'A'; CharIndex <= Char2Glob; ++CharIndex)
X			if (EnumLoc == Func1(CharIndex, 'C'))
X				Proc6(Ident1, &EnumLoc);
X		IntLoc3 = IntLoc2 * IntLoc1;
X		IntLoc2 = IntLoc3 / IntLoc1;
X		IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1;
X		Proc2(&IntLoc1);
X	}
X
X/*****************
X-- Stop Timer --
X*****************/
X
X#ifdef TIME
X	benchtime = time( (long *) 0) - starttime - nulltime;
X	printf("Dhrystone time for %ld passes = %ld\n",
X		(long) LOOPS, benchtime);
X	printf("This machine benchmarks at %ld dhrystones/second\n",
X		((long) LOOPS) / benchtime);
X#endif
X#ifdef TIMES
X	times(&tms);
X	benchtime = tms.tms_utime - starttime - nulltime;
X	printf("Dhrystone time for %ld passes = %ld\n",
X		(long) LOOPS, benchtime/HZ);
X	printf("This machine benchmarks at %ld dhrystones/second\n",
X		((long) LOOPS) * HZ / benchtime);
X#endif
X
X}
X
XProc1(PtrParIn)
XREG RecordPtr	PtrParIn;
X{
X#define	NextRecord	(*(PtrParIn->PtrComp))
X
X	structassign(NextRecord, *PtrGlb);
X	PtrParIn->IntComp = 5;
X	NextRecord.IntComp = PtrParIn->IntComp;
X	NextRecord.PtrComp = PtrParIn->PtrComp;
X	Proc3(NextRecord.PtrComp);
X	if (NextRecord.Discr == Ident1)
X	{
X		NextRecord.IntComp = 6;
X		Proc6(PtrParIn->EnumComp, &NextRecord.EnumComp);
X		NextRecord.PtrComp = PtrGlb->PtrComp;
X		Proc7(NextRecord.IntComp, 10, &NextRecord.IntComp);
X	}
X	else
X		structassign(*PtrParIn, NextRecord);
X
X#undef	NextRecord
X}
X
XProc2(IntParIO)
XOneToFifty	*IntParIO;
X{
X	REG OneToFifty		IntLoc;
X	REG Enumeration		EnumLoc;
X
X	IntLoc = *IntParIO + 10;
X	for(;;)
X	{
X		if (Char1Glob == 'A')
X		{
X			--IntLoc;
X			*IntParIO = IntLoc - IntGlob;
X			EnumLoc = Ident1;
X		}
X		if (EnumLoc == Ident1)
X			break;
X	}
X}
X
XProc3(PtrParOut)
XRecordPtr	*PtrParOut;
X{
X	if (PtrGlb != NULL)
X		*PtrParOut = PtrGlb->PtrComp;
X	else
X		IntGlob = 100;
X	Proc7(10, IntGlob, &PtrGlb->IntComp);
X}
X
XProc4()
X{
X	REG boolean	BoolLoc;
X
X	BoolLoc = Char1Glob == 'A';
X	BoolLoc |= BoolGlob;
X	Char2Glob = 'B';
X}
X
XProc5()
X{
X	Char1Glob = 'A';
X	BoolGlob = FALSE;
X}
X
Xextern boolean Func3();
X
XProc6(EnumParIn, EnumParOut)
XREG Enumeration	EnumParIn;
XREG Enumeration	*EnumParOut;
X{
X	*EnumParOut = EnumParIn;
X	if (! Func3(EnumParIn) )
X		*EnumParOut = Ident4;
X	switch (EnumParIn)
X	{
X	case Ident1:	*EnumParOut = Ident1; break;
X	case Ident2:	if (IntGlob > 100) *EnumParOut = Ident1;
X			else *EnumParOut = Ident4;
X			break;
X	case Ident3:	*EnumParOut = Ident2; break;
X	case Ident4:	break;
X	case Ident5:	*EnumParOut = Ident3;
X	}
X}
X
XProc7(IntParI1, IntParI2, IntParOut)
XOneToFifty	IntParI1;
XOneToFifty	IntParI2;
XOneToFifty	*IntParOut;
X{
X	REG OneToFifty	IntLoc;
X
X	IntLoc = IntParI1 + 2;
X	*IntParOut = IntParI2 + IntLoc;
X}
X
XProc8(Array1Par, Array2Par, IntParI1, IntParI2)
XArray1Dim	Array1Par;
XArray2Dim	Array2Par;
XOneToFifty	IntParI1;
XOneToFifty	IntParI2;
X{
X	REG OneToFifty	IntLoc;
X	REG OneToFifty	IntIndex;
X
X	IntLoc = IntParI1 + 5;
X	Array1Par[IntLoc] = IntParI2;
X	Array1Par[IntLoc+1] = Array1Par[IntLoc];
X	Array1Par[IntLoc+30] = IntLoc;
X	for (IntIndex = IntLoc; IntIndex <= (IntLoc+1); ++IntIndex)
X		Array2Par[IntLoc][IntIndex] = IntLoc;
X	++Array2Par[IntLoc][IntLoc-1];
X	Array2Par[IntLoc+20][IntLoc] = Array1Par[IntLoc];
X	IntGlob = 5;
X}
X
XEnumeration Func1(CharPar1, CharPar2)
XCapitalLetter	CharPar1;
XCapitalLetter	CharPar2;
X{
X	REG CapitalLetter	CharLoc1;
X	REG CapitalLetter	CharLoc2;
X
X	CharLoc1 = CharPar1;
X	CharLoc2 = CharLoc1;
X	if (CharLoc2 != CharPar2)
X		return (Ident1);
X	else
X		return (Ident2);
X}
X
Xboolean Func2(StrParI1, StrParI2)
XString30	StrParI1;
XString30	StrParI2;
X{
X	REG OneToThirty		IntLoc;
X	REG CapitalLetter	CharLoc;
X
X	IntLoc = 1;
X	while (IntLoc <= 1)
X		if (Func1(StrParI1[IntLoc], StrParI2[IntLoc+1]) == Ident1)
X		{
X			CharLoc = 'A';
X			++IntLoc;
X		}
X	if (CharLoc >= 'W' && CharLoc <= 'Z')
X		IntLoc = 7;
X	if (CharLoc == 'X')
X		return(TRUE);
X	else
X	{
X		if (strcmp(StrParI1, StrParI2) > 0)
X		{
X			IntLoc += 7;
X			return (TRUE);
X		}
X		else
X			return (FALSE);
X	}
X}
X
Xboolean Func3(EnumParIn)
XREG Enumeration	EnumParIn;
X{
X	REG Enumeration	EnumLoc;
X
X	EnumLoc = EnumParIn;
X	if (EnumLoc == Ident3) return (TRUE);
X	return (FALSE);
X}
X
X#ifdef	NOSTRUCTASSIGN
Xmemcpy(d, s, l)
Xregister char	*d;
Xregister char	*s;
Xint	l;
X{
X	while (l--) *d++ = *s++;
X}
X#endif
SHAR_EOF
echo shar: extracting dryresults.sh;
sed 's/^X//' <<'SHAR_EOF' >dryresults.sh
X#
X#	Pick out just the results lines from the dry.c source file
X#
Xsed -e '1,/RESULTS BEGIN/d' -e '/RESULTS END/,$d' <dry.c >dry.results
SHAR_EOF
echo shar: extracting gen_rpt;
sed 's/^X//' <<'SHAR_EOF' >gen_rpt
X#
X#	Crunch the raw output from the various benchmarks into
X#	a reasonably neat listing.  Sorry, this is gross shell
X#	programming to the max.
X#
XTMP=/tmp/$$
XRPT=$2; export RPT
Xcp $1 $TMP
Xed - $TMP <<EOF
XH
Xg/^\$/d
Xg/^[0-9].*/d
Xg/^	/s///
Xg/^for/d
Xg/^File/d
Xg/^Normal/d
Xg/^Filling/d
Xg/^Buffer/d
Xg/^Done/d
Xg/^Dhrystone/d
Xg/time [^ ]* /s///
Xg/^real/.-1,.j
Xg/^user/.-1,.j
Xg/^sys/.-1,.j
Xg/^This machine benchmarks at/.-1,.j
Xg/This machine benchmarks at/s///
Xg/real/s///
Xg/user/s///
Xg/sys/s///
Xg/   */s//	/g
X1i
XBENCHMARK	REAL	USER	SYS
X---------	----	----	---
X.
Xw
Xq
XEOF
Xuname -a >$RPT
Xecho >>$RPT
XQUEST="MANUF MODEL CPU CLOCK RAM DISK FPA"
Xecho "Please answer $QUEST questions below."
Xecho "e.g. MANUF: IBM;   MODEL: PC/AT;     CPU: 80286;   CLOCK: 6Mhz;"
Xecho "     RAM: 2MB;     DISK: 20MB CMI;   FPA: 80287"
Xfor i in $QUEST
Xdo
X	echo "$i:	\c" | tee /dev/tty >>$RPT
X	read a
X	echo "$a" >>$RPT
Xdone
Xecho >>$RPT
Xnewform -i40,50,60,70 <$TMP >>$RPT
Xecho >>$RPT
Xdate >>$RPT
Xrm $TMP
SHAR_EOF
exit