Question: Consider program P running on a 1-GHz machine M in 10 seconds. Someone optimizes P by replacing all instances of multiplying a value x by

 Consider program P running on a 1-GHz machine M in 10

Consider program P running on a 1-GHz machine M in 10 seconds. Someone optimizes P by replacing all instances of multiplying a value x by 2 (multx.r,2) with a single add instruction (add xx.r) and by replacing all instances of multiplying by 4 (mult x.x,4) with a single shift instruction (s11 xx,2). The optimized program P' runs in 8.6 seconds on the same machine. If the CPI of mult is 4, and the CPI of each add and s11 is 2, how many multiplies (total- both multiplies by 2 and multiplies by 4) were replaced by the optimization? 1. Consider program P running on a 1-GHz machine M in 10 seconds. Someone optimizes P by replacing all instances of multiplying a value x by 2 (multx.r,2) with a single add instruction (add xx.r) and by replacing all instances of multiplying by 4 (mult x.x,4) with a single shift instruction (s11 xx,2). The optimized program P' runs in 8.6 seconds on the same machine. If the CPI of mult is 4, and the CPI of each add and s11 is 2, how many multiplies (total- both multiplies by 2 and multiplies by 4) were replaced by the optimization? 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!