Question

Consider program P, which runs on a 1GHz machine in 10 seconds, An optimization is made...

Consider program P, which runs on a 1GHz machine in 10 seconds, An optimization is made to P, replacing all instances of multiplying a value by 4 (mult X, X, 4) with two instructions that set x to x + x twice (add X, X; add X, X) Call this new optimized program P’. The CPI of a multiply instruction is 4, and that of add is 1. After recompiling, the program runs in 9 seconds on machine M. How many multiples were replaced by the new compiler?

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT