Workstation
Volume Number: 3
Issue Number: 3
Column Tag: MacCad
Workstation Potential of the New Macs
By Paul Zarchan, Cambridge, Mass
Paul Zarchan is an engineer for a well known east coast laboratory with a heavy
investment in engineering workstations. In this article, Paul examines the potential of
the new Macs to penetrate the world of Sun, Apollo and other desktop CAD systems.
MacTutor is committed to covering this important applications development area of
MacCad on the new Macs in the coming year and this is our first article for this new
column.
Introduction
Today there are nearly 10 million personal computers in both the home and
business world, including nearly 1 million Macs, according to Apple's press releases.
Much has improved with personal computer hardware since the first Apple II was
introduced 10 years ago. In addition, the personal computer industry has spawned the
creation of new software applications such as word processing, spread sheets and
desktop publishing. These desktop computers also have another, albeit relatively
unknown capability - computing! It will be demonstrated that a currently available
$6,000 Prodigy 4 (Macintosh plus Levco board) can run engineering simulations at
approximately one half the speed of a $250,000 super mini-computer and about one
tenth the speed of a multi million dollar mainframe. With the advent of a new family of
Macintosh Workstations based on technology similar to the Prodigy board, it is
expected that Apple will move heavily into the engineering workstation market. How
effective will this new market be for Apple? If this article is any indication, the new
Macs will be quite successful indeed!
A New World for Micros
Digital computer simulation is often used as an aid in solving many engineering
problems. For example, simulation is the heart of many circuit analysis programs. In
this application, system dynamics are modeled with differential equations and
numerical integration techniques are utilized for solving these equations. Unlike most
PC software applications, the speed of floating point arithmetic is critical to
simulation. A slow computer or inefficient language can make the simulation of high
order systems unattractive because of excessive computation time. It will be
demonstrated that for simulation on a Macintosh, MacFORTRAN provides execution
speed that is unmatched by any other high level language. A chart is presented showing
how to predict execution time based upon system order, simulation time and
integration step size for simulations written in FORTRAN on a variety of computers.
A simple, standard floating point benchmark, written in interpretive BASIC, is
first used to compare a variety of 8, 16 and 32 bit commercially available PC's. Based
upon the relative computer execution speeds, an empirical relationship involving
number of bits and computer clock rate is developed not only to understand why certain
micros are faster than others but also to be able to predict the relative speeds of PC's
which are not yet commercially available. Next a simulation example, involving the
transient response of a Butterworth filter, is programmed in FORTRAN. It is
demonstrated that although this more realistic example yields different speed
comparisons between micros as did the BASIC floating point benchmark, the trend is in
the same direction - more bits and higher clock rates increase computation speed. The
same simulation example is then run on a Macintosh computer using a variety of
computer languages. It is shown that on this computer FORTRAN and compiled BASIC
offer computation speeds superior to that of either compiled PASCAL or C. Finally,
using FORTRAN as the common language for the simulation example, a variety of
micro, super mini and mainframe computers are compared in terms of execution
speed. It is shown that a 32 bit 16 Mhz Prodigy 4 (Macintosh computer plus Levco
board) can run simulations at approximately one half the speed of a VAX 785 and
approximately one tenth the speed of an IBM 3084Q.
Microcomputer Comparison
In order to compare micro-computer speed, a common example written in a
common language is required. A standard benchmark, representitive of single
precision arithmetic, was developed by BYTE magazine using the BASIC language. The
BASIC language was chosen as the standard because it is available on all
micro-computers. The program listing appears below. Note that the question of
accuracy, which of course is vital to engineering applications, is not address here.
10 PRINT TIME$
20 a=2.71828
30 b=3.14159
40 c=1
50 FOR i=1 TO 5000
60 c=c*a
70 c=c*b
80 c=c/a
90 c=c/b
100 NEXT i
110 PRINT TIME$
120 END
Listing 1 - BYTE Floating Point Benchmark
We can see from the listing that the program executes 10,000 single precision
multiplies and divides. The timing results for a variety of commercially available PCs
along with other information, appears in Table 1. In addition, the last column of Table
1 indicates resultant running times compared to an IBM PC in the form of a ratio. A
ratio of 2.2 means that the indicated microcomputer was 2.2 times faster than an IBM
PC for this BASIC benchmark. We shall see later that the ratios for computer speed
using BASIC on this benchmark are indicative of relative computer speeds using other
languages and more realistic problems.
Table 1 indicates that the microcomputers fall into three different speed classes.
Generally these speed classes are a function of the number of bits and computer clock
rates. The table shows that, contrary to popular opinion, the 16 bit 80286 based IBM
AT is in the same class as the 68000 based 16 bit Atari, Macintosh and Amiga
computers for the BASIC benchmark. The Table also shows that computer clock rate is
important in determining computer speed. In fact, doubling either the clock rate or
doubling the number of bits doubles the computer speed. For example, a Prodigy 4 is
approximately 4 times as fast as a Macintosh (32 bits - 16 Mhz versus 16 bits - 7.8
Mhz) and a 6 Mhz IBM AT is nearly 2.7 times faster than an IBM PC (16 bits - 6 Mhz
versus 8 bits - 4.77 Mhz). In the IBM world the importance of clock rate is well
known. That is why there exist many third party upgrades to increase the clock rate of
an IBM AT or compatable up to 12 Mhz. Figure 1 displays in bar chart form, the
actual speed for the BASIC benchmark of various micros relative to an IBM PC.
Superimposed on the chart is a line graph using the empirical relationship involving
bits and clock rate. The proximity of the line graph and bars shows that the simple
empirical relationship is quite accurate in the case of the standard BASIC benchmark.
Machine Bits Clock Time Ratio
Rate (Mhz) (Sec)
Commodore 128 8 60 1.15
Apple 2E -6502 8 1.0 94 .73
IBM PC, XT - 8088 8 4.77 69 1
Tandy 1000 - 8088 8 4.77 68 1.01
IBM AT - 80286 16 6 26 2.65
Compaq 286 - 80286 16 6 22 3.1
Atari 520 ST - 68000 16 8 31 2.2
Amiga - 68000 16 7.16 18 3.8
Macintosh 512, Plus * 16 7.8 21 3.29
Compaq 386 - 80386 32 16 7 9.86
Prodigy 4 - 68020 32 16 5 13.8
* Language was MS Basic 3.0 Interpreter
Table 1 - Microcomputer Speed Comparison
Fig. 1 Speed Improvement Predicted Knowing Bits and Clock Rate.
Simulation Example
In order to compare various machines, a more realistic example, representitive
of simulation, is taken from filtering theory. A sixth order Butterworth filter can be
represented by the transfer function:
where x is the filter input, y is the filter output, w0 is the natural frequency of the
filter and s is the Laplace transform notation for a derivative. The coefficients of a
sixth order Butterworth filter are given by:
a1 = 3.86
a2 = 7.46
a3 = 9.13
a4 = 7.46
a5 = 3.86
a6 = 1
Cross multiplying the numerator and denominator of the transfer function and
solving for the highest derivative yields the following sixth order differential equation:
where each "dot" represents a differentiation. This differential equation can be
represented in block diagram form as shown in Fig. 2. In this diagram each "1/s
represents an integration. The output of each integrator has been labeled x(1) thru
x(6).
For simulation purposes it is more convenient to express the sixth order
differential equation describing the Butterworth filter by 6 first order differential
equations. These equations can be obtained from Fig. 2 by inspection and are given by: