Given the parameters of Problem 3, consider a strength-reducing optimization tha
ID: 3765271 • Letter: G
Question
Given the parameters of Problem 3, consider a strength-reducing optimization that converts multiplies by a compile-time constant into a sequence of shifts and adds. For this instruction mix, 50% of the multiplies can be converted to shift-add sequences with an average length of three instructions. Assuming a fixed frequency, compute the change in instructions per program, cycles per instruction, and overall program speedup.
Note: This answer is for the original parameters p Needs to be recomputed.
Explanation / Answer
TYPE OLD MIX NEW MIX COST CPI
Store 15% 15% 1 0.15
Load 25% 25% 2 0.50
Branch 15% 15% 4 0.60
Integer & shift 40% 47.5% 1 0.475
Multiply 5% 2.5% 10 0.25
Total 100% 105% 1.975/105%
=1.8810
There are 5% more instructions per program, the CPI is reduced to 1.8810, and overall speedup is 2.15/1.975 = 1.0886.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.