SLIDE 2 ENCM 501 W14 Slides for Lecture 4
slide 7/30
How to evaluate performance (1)
Given two different computer designs, how do you decide which is “better”? Think about comparing other kinds of machines. For example, which is “better”, (a) a “3/4 ton” pickup truck,
- r (b) a midsize luxury AWD sedan? Do you want to
◮ . . . move construction supplies? ◮ . . . pull a large trailer? ◮ . . . commute comfortably to an office job?
ENCM 501 W14 Slides for Lecture 4
slide 8/30
How to evaluate performance (2)
The analogy to vehicle selection can be used to make two key points . . .
◮ Obviously, making the best choice of machine, or at least
a reasonably good choice, depends on what the machine is going to be used for.
◮ No single narrow-scope measurement of performance is
very useful. It doesn’t make sense to use fastest acceleration from 0 to 60 mph, or fastest time to sort an array of 10 million doubles, as a sole criterion.
ENCM 501 W14 Slides for Lecture 4
slide 9/30
Often this makes sense: performance ∝ 1/time
Think about these examples:
◮ Software developer builds an executable from a large
body of C or C++ code.
◮ Digital designer runs a detailed simulation of a complex
circuit.
◮ Meteorologist runs 5-day weather forecast program using
current atmospheric data as input. These tasks can take minutes or hours to run. There are
- bvious incentives to find hardware that will help minimize
running time.
ENCM 501 W14 Slides for Lecture 4
slide 10/30
Use ratios of running time to compare time-based performance
For a given task run on Systems A and B, performanceA performanceB = timeB timeA Example: For some task, timeA = 1000 s and timeB = 750 s. Then, for this task, System B is 1000/750 = 1.33 times as fast as System A. Equivalently, System B provides a speedup
- f 1.33 relative to System A.
Ratios are easier to work with and harder to misinterpret than
- ther ways to compare speed. For example, avoid saying
things like, “System B gives a 25% decrease in running time,”
- r, “System B gives a 33% increase in speed.”
ENCM 501 W14 Slides for Lecture 4
slide 11/30
What might System A and System B be?
There are lots of different kinds of interesting practical
- comparisons. Some of the many possibilities:
◮ same source code, different ISAs, different hardware,
different compilers
◮ same source code, same ISA, same compiler, different
hardware
◮ same source code, same ISA, same hardware, different
compiler
◮ same source code, same ISA, same hardware, same
compiler, different compiler options
◮ different source codes for the same task, same
everything else Don’t forget about the last one! Choice of data structures and algorithms can be a huge factor!
ENCM 501 W14 Slides for Lecture 4
slide 12/30
What programs should be used for performance evaluation?
This is a hard question, because every user is different. SPEC (Standard Performance Evaluation Corporation, www.spec.org) takes the position that complete runs of “suites” of carefully-chosen real-world programs are the best way to get general performance indexes for computer systems. Alternatives, such as runs of much smaller programs that are supposedly representative of practical code are problematic:
◮ the small programs will more likely fail to test some
important features that real-world programs depend on;
◮ hardware designers and compiler and library writers can
sometimes “game” synthetic benchmarks.