- This is 1.6 in the book.
- What does performance mean?
- They give a nice chart in the book
-
Airplane | Capacity (passengers) | Range (miles) | Speed (MPH) |
Boeing 777 | 375 | 4630 | 610 |
Boeing 747 | 470 | 4150 | 610 |
Concorde | 132 | 4000 | 1350 |
Douglas DC-8-50 | 146 | 8720 | 544 |
- Why the differences?
- Are all planes equally good?
- What is best for a "bus in the sky"?
- How about getting there fast?
- What about something for a small intercontinental sales team?
- What other measures might be important?
- They give one other number
-
Airplane | Throughput |
Boeing 777 | 228,750 |
Boeing 747 | 228,700 |
Concorde | 178,200 |
Douglas DC-8-50 | 79,424 |
- Where throughput is passengers x mph
- Is there a problem with this measurement?
- When attempting to define performance in a CPU (or computer in general) there are a number of problems
- Is clock speed a good measurement of performance?
- How about instructions per second? (MIPS was once a standard)
- Clock Rates, CPI and other measures are not valid comparisons across different instruction sets. Only in the same family.
- Section 1.9 discusses a current benchmark set for CPU performance
- Fallacy and Pitfalls discusses how MIPS is a bad measurement.
- Since this is related to marketing, sometimes companies have behaved poorly.
- In the end, the speed at which your program is executed is the best valid measurement of performance.
- Simple or complex instruction set
- Clock speed
- And other considerations
- Execution Time = seconds/cycle x cycles/instruction x instructions/program
- Performance = 1/Execution Time
- If machine X is n times faster than machine Y
- PerformanceX/PerformanceY = n
- Or ExecutionY/ExecutionX = n
- Problem 1.5 page 55
Clock(GHz) CPI
P1: 3.0 1.5
P2: 2.5 1.0
P3: 4.0 2.2
I have:
cycles/instruction (CPI)
cycles/second (Hz)
I want:
instructions/second (Performance)
A cycle instructions A instructions
------- x ------------ = --------------
second B cycle B seconds
P1:
3x109
----- = 2x109
1.5
P2:
2.5x109
------ = 2.5x109
1.0
P3:
4.0x109
------ = 1.8x109
2.2
Relative performance of P1 to P2 is
PerformanceP2 2.5x109
------------- = ------- = 1.25
PerformanceP1 2.0x109
Or P2 is 1.25 times as fast as P1.
Or P1 is 1.25 times slower than P2.
- Example, Question 1.12 page 58
Clock CPI Instructions
P1: 4GHz 0.9 5.0E9
P2: 3GHz 0.75 1.0E9
Which has better performance and why?
- Example: One I made up
Assume multicycle CPU has the following instruction mix for a given program.
Instruction Class Cycles Frequency
A 1 20%
B 2 40%
C 3 30%
D 4 10%
Find the average CPI
- They have a discussion on page 38 that is important
- What affects the speed of a program?
- The ISA (Instruction Set Architecture)
- Clock Speed
- CPI
- Instructions
- Compiler
- Choice of instructions -> instruction mix -> CPI
- Instruction count
- Memory access -> CPI
- Programming Language
- Instruction Count
- Choice of instructions
- Abstraction -> more function calls
- Think of a OO program vs a structure program.
- Algorithm/Programmer
- Instruction count (BIG TIME)
- CPI (instruction choice)