Lecture 3: Performance/Power, MIPS Instructions
Lecture 3: Performance/Power, MIPS Instructions
Lecture 3: Performance/Power, MIPS Instructions
• Today’s topic:
1
Factors Influencing Performance
2
Example
4
Example Problem
5
Example Problem
Note:
Frequency only impacts dynamic power, not leakage power.
We assume that the program’s CPI is unchanged when
frequency is changed, i.e., exec time varies linearly
with cycle time. 6
Benchmark Suites
7
SPEC CPU
• The SPEC rating specifies how much faster a system is, compared to
a baseline machine – a system with SPEC rating 600 is 1.5 times
faster than a system with SPEC rating 400
• Note that this rating incorporates the behavior of all 29 programs – this
may not necessarily predict performance for your favorite program!
8
Deriving a Single Performance Number
9
Amdahl’s Law
• Amdahl’s Law
11
Recap
12
Instruction Set
13
Instruction Set
14
A Basic MIPS Instruction
C code: a=b+c;
C code a = b + c + d + e;
translates into the following assembly code:
add a, b, c add a, b, c
add a, a, d or add f, d, e
add a, a, e add a, a, f
C code f = (g + h) – (i + j);
17
Subtract Example
C code f = (g + h) – (i + j);
translates into the following assembly code:
18
Operands
20
Memory Operands
int a, b, c, d[10]
…
Memory
Base address
22