Performance of Processor1
Performance of Processor1
Performance
• Basic problem: how can we tell if one processor is faster than
another?
Solution:
Ex 2:
A program runs on computer A with a 2 GHz clock in 10 seconds. What
clock rate must a computer B has to run this program in 6 seconds?
Unfortunately, to accomplish this, computer B will require 1.2 times as
many clock cycles as computer A to run the program.
Solution:
We denote x as clock cycle # on computer A, y as clock rate on computer
B.
x = 10 × 2 × 109 , 1.2x = 6 × y. → y = 4 × 109 = 4 GHz.
Ex 3:
Ex 4:
Suppose a program has the following
25% instructions are loads/stores (each take 2 cycles)
50% instructions are adds (each takes 1 cycle)
25% instructions are square root (each takes 50 cycles)
What is the CPI for this benchmark?
Solution:
CPI = ((0.25 * 2) + (0.50 * 1) + (0.25 * 50)) = 13.5
Ex 5:
Computers A and B implement the same ISA. Computer A has a clock cycle
time of 250 ps and an effective CPI of 2.0 for some program and computer
B has a clock cycle time of 500 ps and an effective CPI of 1.2 for the same
program. Which computer is faster and by how much?
Solution:
Assume each computer executes I instructions, so
CPU timeA = I × 2.0 × 250 = 500 × I ps
CPU timeB = I × 1.2 × 500 = 600 × I ps
• clockrateA = 1.2444GHz
Ex 7: