Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site utastro.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!ut-sally!utastro!nather
From: nather@utastro.UUCP (Ed Nather)
Newsgroups: net.micro,net.micro.pc
Subject: Longword benchmark on IBM PC and Vax 11/780
Message-ID: <946@utastro.UUCP>
Date: Thu, 20-Dec-84 17:59:11 EST
Article-I.D.: utastro.946
Posted: Thu Dec 20 17:59:11 1984
Date-Received: Sat, 22-Dec-84 02:15:06 EST
Distribution: net
Organization: UTexas Astronomy Dept., Austin, Texas
Lines: 42
Xref: watmath net.micro:8957 net.micro.pc:3025

[--+- 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