Page 165 - A Practical Guide from Design Planning to Manufacturing
P. 165
138 Chapter Five
Trying to avoid the problem of different instruction sets, some com-
puters are rated in terms of millions of floating-point operations per
second (MFLOPS). This unfortunately is little better. Addition and divi-
sion are both floating-point operations, but they require very different
amounts of computation. A meaningful measure of MFLOPS requires
assuming some distribution of adds, multiplies, and divides from a “typ-
ical” program. Choosing a typical program will also determine how much
time is spent performing loads and branches and other instructions that
are not counted. An imaginary program, which performed nothing but
floating-point addition, would achieve far higher MFLOPS than any real
application, but the temptation to quote this peak value is too much for
almost any company to resist.
Because values like MIPS, MFLOPS, and IPC will all vary from one
program to another, one of the most commonly used measures of per-
formance is the processor frequency. It is simple and remains constant
regardless of the program. Frequency is actually not a bad metric for
comparing performance between processors with the same microarchi-
tecture. Replacing one Pentium 4 with another at 20 percent higher clock
frequency will improve performance about 20 percent. Having the same
microarchitecture makes their IPC equal and having the same archi-
tecture makes their instruction counts equal. Best of all, frequency is
something that is measured easily and not a subject of debate. However,
frequency becomes a poor metric when comparing processors of differ-
ent architectures or microarchitectures.
In some ways, measuring frequency is like measuring the rotations
per minute of a motor. Running a motor faster will provide more power,
but an eight-cylinder engine will do far more work than a four-cylinder
engine at the same RPM. What matters is not just the number of rota-
tions but the amount of work performed by each rotation. Two processors
with different microarchitectures may give very different performance
even at the same frequency. The best method for comparing performance
is benchmarks. These metrics measure the time to run parts of real pro-
grams and average the results together to create a numeric measure of
performance.
This is the equivalent to running cars through an obstacle course, but
what are reasonable obstacles? Whereas some drivers might drive off
road on a regular basis, others are more concerned with downtown traf-
fic. Creating a computer benchmark requires picking pieces of programs
believed to be representative of “typical” use. Some of the most widely used
computer benchmarks come from the nonprofit Standard Performance
Evaluation Corporation (SPEC). SPEC was created in the 1980s specifically
to create better measures of computer performance. The SPECint2000
benchmark measures performance on 12-integer applications, and the