[comp.unix.wizards] ips, ops, flops.....

blanken@uiucdcsb.cs.uiuc.edu (10/21/87)

I was reading a magazine, and at one point the article compared a number
of computers (Hypercubes, parallel and various architectures) by listing
different speeds.  I understand that all computers have clocks that run
at different speeds or cycles (Mhz...etc).  But the article was using
terms like  Mips, Mops, Mflops.  Discarding the M as Mega, 

	ips = instructions per second
	ops = operations per second
	flops = floating point operations per second 

I was wondering how these items relate to clock speed.  I understand
that if you have a 16Mhz clock, you don't have 16Mips...etc.  

Can anyone help me figure out the difference among these quantitative 
descriptions?

Eric Blankenburg	ARPA:	blanken@a.cs.uiuc.edu
University of Illinois	CSNET:	blanken@uiuc.csnet
  at Urbana-Champaign	UUCP:	{ihnp4, pur-ee, convex}!uiucdcs!blanken

alter@ttidca.TTI.COM (Steve Alter) (10/26/87)

In article <164600007@uiucdcsb> you write:
>	ips = instructions per second
>	ops = operations per second
>	flops = floating point operations per second 
>
>I was wondering how these items relate to clock speed.  I understand
>that if you have a 16Mhz clock, you don't have 16Mips...etc.  

I don't know the difference between ips and ops, but I do know why
this form of speed metric is prefered over simple clock-speed.  The
following story is *very* oversimplified but shows the basic concepts.

Take two machines by different manufacturers.  Let's call one Fred and
the other one Sue.  Now Fred considers himself a real speed-demon with
a clock that zips along at a whopping 40Mhz.  Sue, however, takes her
time at a leisurely 18Mhz.  If we port the same operating system to
both machines, with supposedly the same effort expended on each, then
you might think that Fred will produce the greater throughput?  We
don't know yet.

More facts: Fred is a machine with a highly complex and convoluted
instruction set, and a great many addressing modes and other bells and
whistles.  Because of this complexity, he is a micro-programmed
machine which means that his instruction set is really just a "language"
that gets interpreted by a micro-program whose operations are the real
hard-wired ones.  Micro-programming is a multi-step process, and we
can suppose that a typical operation such as an ADD or MOVE, with all
of the complex addressing mode handling could take as long as 20 clock
cycles (let's call the average 16.)

Sue is a RISC (Reduced Instruction Set Computer) processor.  She is
not micro-programmed which means that her instructions are executed
directly by the processor which is feasable because her instruction
set is much simpler.  She can exeute 90% of her normal operations in
exactly 2 clock cycles.  Since she doesn't have all of Fred's fancy
addressing modes, she requires maybe 2 or 3 instructions to perform
what Fred can do in 1 instruction.

Now let's put the numbers together:
Fred cranks at 40Mhz but takes 16 cycles to do an instruction.  Net
speed: 2.5Mips.  Since Fred can do quite a lot in that one instruction,
let's call that amount of work one "operation".  Thus on Fred, 2.5Mips
is the same as 2.5Mops.  Sue moseys along at 18Mhz and requires 6
cycles to perform one "operation".  (That's 2 cycles per instruction
multiplied by 3 instructions per operation.)  Net speed: 3 Mops.

The result is that Sue is a slightly faster machine.

On a separate point, the ratio between ops and flops can tell you
quite a lot about the machine and what it's best suited for.  For
example, a small machine with no floating point instructions at all
have to do all the work using subroutines and have a very low ratio of
flops to ops (i.e. close to zero).  There exist machines, however,
with such fast floating point hardware, that the ratios of flops to ops
aren't that far from 1!.

-- Steve Alter
...!{csun,rdlvax,trwrb,psivax}!ttidca!alter  or  alter@tti.com
Citicorp/TTI, Santa Monica CA  (213) 452-9191 x2541
-- 

-- Steve Alter
...!{csun,rdlvax,trwrb,psivax}!ttidca!alter  or  alter@tti.com
Citicorp/TTI, Santa Monica CA  (213) 452-9191 x2541