Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(18 pt) Suppose you have analyzed a benchmark that runs on your company\'s compu

ID: 3891715 • Letter: #

Question

(18 pt) Suppose you have analyzed a benchmark that runs on your company's computer and it has the following characteristics in the table with 500MHz processor Cycles Instruction Type Arithmetic and logical Load and Store Branches Floating Point Frequency (%) 40 30 20 10 10 C. (6 pts) Suppose that you turn on the optimizer and it eliminates 25% of the arithmetic/logic instructions (i.e. 10% of the total instructions) and 50% of load and store instructions (ie, 15% of the total instructions). None of other parameters of the system is affected. What is the speedup of the optimized program? Show your work.

Explanation / Answer

1.
   Assuming we have n instructions

   Time taken = 0.4 * n * 1 + 0.3 * x n * 2 + 0.2 * n * 3 + 0.1 * n * 10
               = 0.4n + 0.6n + 0.6n + n
               = 2.6n

   With optimizer
               = (0.4 * n - 0.25 * 0.4 * n) * 1 + (0.3 * n - 0.50 * 0.3 *n)*2
                 + 0.2 * n * 3 + 0.1 * n * 10

               = 0.75 * 0.4 *n + 0.3 * 0.5 * n * 2 + 0.2 * n * 3 + 0.1 * n * 10
               = 0.3n + 0.3n + 0.6n + n
               = 2.2 n cycles

Speedup = 2.6n/2.2n = 1.18