Metrics
- Space
- Instruction Frequency
- [[#Instruction Frequency#Static]]
- [[#Instruction Frequency#Dynamic]]
- Instruction Frequency
- Time
- Benchmarking (culmination of the above)
Execution Time
where
Total Execution Time
Cumulative total of the execution times of the individual programs
Geometric Mean
This is generally the default The metric removes the bias present in arithmetic mean
Arithmetic Mean
This metric is biased towards time-consuming jobs
Harmonic Mean
This metric is biased against time-consuming jobs
Weighted Arithmetic Mean
This metric takes into account the relative frequency of the execution of the programs in the benchamrk mix
Instruction Frequency
Static
Occurence of instruction X in compiled code
Dynamic
Occurence of instruction X in executed code
Benchmarking
The goal of a benchmark is to be representative of the expected workload for a processor.
Improving Performance
Goal: minimize Execution Time Execution time = Instruction Count * CPI * Cycle Time So just reduce one of the factors
Measuring Improvement
Office Walk (Amdahl's Law)
I can walk from my office to campus in 12 minutes, and run there twice as fast as I can walk, and I walk half the distance and run the rest, how long will it take?
Processor Optimization (Amdahl + Speedup Improved)
A processor spends 15% of its time on ADD instructions. An engineer proposes to improved the speed of the ADD instruction threefold. What is the speedup achieved by this modification?
11% speedup
Architecture Change
We have a computer with three types of instructions that have the following CPIs:
Type CPI A 2 B 5 C 1 An architect determines that he can reduce the CPI for B to 4, but will need to slow down the clock speed of the processor. What is the maximum permissible slowing of the clock that will make this change worthwhile? Assume that all the workloads for this processor use 25% A, 15% B, and 60% C type instructions, respectively. where
and are the dynamic frequencies and CPIs of each type of instruction For the design to be viable:
The maximum permissible slowdown is about 9%