[net.micro] Longword benchmark on IBM PC and Vax 11/780

nather@utastro.UUCP (Ed Nather) (12/21/84)

[--+- begone!]
The December 1984 issue of Byte magazine lists a benchmark test in C
that is computationally intensive using long integer arithmetic. The
process involves factoring a very large number by an iterative method. 
The author, David C. Clark, lists execution times for the program on a 
Z80 computer with a 4MHz clock, for two different compilers, Aztec C and
Eco-C.  I compiled and ran the same program on an IBM PC (4.77 MHz
clock, 8088 chip) using the DeSmet C compiler and the optimizing CI-C86
compiler.  I also ran the same program on a Vax 11/780 running 4.2BSD
Unix.  Here are the execution times:

Compiler         Computer          Execution time (min:sec.)

Aztec              Z80                     2:06
Eco-C              Z80                     1:41
CI-C86            IBM-PC                   0:22.4
DeSmet C          IBM-PC                   0:10.1
PCC               Vax 11/780               0:00.4

Apparent conclusions:

   1. 32-bit machines handle 32 bit integers faster than 16 bit machines,
      and 16 bit machines handle them faster than 8 bit machines, by about
      an order of magnitude or better in each case.

   2. Some compilers generate faster code than others for the same machine,
      by perhaps a factor of 2 or so.  The "optimizing" compiler is not
      always the faster.

   3. Benchmarks aren't the whole story, but I seriously doubt that anyone
      could devise one that would reverse the ordering of execution times 
      for the above three computers.

   4. As a rough figure of merit (for this type of operation only) we can
      multiply the time by the cost of the computer.  Averaging the times
      where there are more than one, and taking the approximate cost of the
      computers involved, I get that the Vax and the IBM PC have about the
      same figure of merit, while the Z80 system is about 3 times worse.
      Curious.  Anybody want to try it on their Macintosh?

Ed Nather
Astronomy Dept., U of Texas

sjl@amdahl.UUCP (Steve Langdon) (12/23/84)

I ran the test on my Macintosh using Mac C (TM) from Consulair Corp.
The execution time was 2.75 seconds.  For those who are also interested in
compile time, the results were:

	compile 15 seconds
	assemble 11 seconds
	link 44 seconds

These times were obtained using my normal operating procedure, which involves
running with a RAM disk containing a small copy of the system, Fast Finder (TM),
Exec, C, Assembler, and Linker.  The source files, libraries etc. are on one
floppy and EDIT, RMaker, etc. are on the other floppy.  I used an Exec job file
to compile and link.  Timing was started when I pressed the execute button in
Exec.  Thus the times above include application startup and so on.  The complete
elapsed time from starting the compile to having an executable version of the
program was 70 seconds.

While I was at it I decided I might as well make other people jealous by running
the test on the UTS system I use at work (running under VM on an Amdahl 470/V8).
The results were:

execute	UTS % timex -p a.out
	Factoring...
	A factor of 1394761 is 1181
	It took 871 iterations
 
 
	real        0.20
	user        0.03
	sys         0.01

compile	UTS % timex -p cc factor.c
 
	real        2.63
	user        0.33
	sys         0.36

The results reported before were:
	
	Compiler         Computer          Execution time (min:sec.)
	 
	 Aztec              Z80                     2:06
	 Eco-C              Z80                     1:41
	 CI-C86            IBM-PC                   0:22.4
	 DeSmet C          IBM-PC                   0:10.1
	 PCC               Vax 11/780               0:00.4

I think both the Macintosh and the V8 look pretty good on this test.

-- 
Stephen J. Langdon                  ...!{ihnp4,hplabs,sun,nsc}!amdahl!sjl

[ The article above is not an official statement from any organization
  in the known universe. ]

lra@aluxe.UUCP (Lonnie R. Abelbeck, AT&T Bell Labs) (12/25/84)

[]
> I ran the test on my Macintosh using Mac C (TM) from Consulair Corp.
> The execution time was 2.75 seconds.  For those who are also interested in
> compile time, the results were:
> 
> 	compile 15 seconds
> 	assemble 11 seconds
> 	link 44 seconds
> 
I couldn't resist, I ran factor.c on my Macintosh using Aztec C68k from
Manx Software Systems.  The execution time was 3.34 seconds.

On a 128k Mac without a RamDisk and standard disk drives

	compile and assemble 30.6 seconds
	link 35.7 seconds
	a total of 66.3 seconds  (this includes startup time for cc, as and ln)

	total size 5290 bytes

Summary:
	Compiler         Computer          Execution time (min:sec.)
	 
	 Aztec              Z80                     2:06
	 Eco-C              Z80                     1:41
	 CI-C86            IBM-PC                   0:22.4
	 DeSmet C          IBM-PC                   0:10.1
	 Aztec C68k        Macintosh                0:03.3
	 Consulair C       Macintosh                0:02.8
	 PCC               Vax 11/780               0:00.4

> I think both the Macintosh and the V8 look pretty good on this test.
dito

Lonnie Abelbeck
mhuxh!aluxe!lra