# Interesting Speedup & Amdahl's law problem

I have found a problem on my Computer Architecture textbook which I have some issues with:

We have a process which spends its time in the following way:

• 50% of the time, it executes common arithmetic (non-floating point) instructions
• 10% of the time, it executes floating point instructions
• 40% of the time, it executes a function which has 4816896 instructions, which is 60% of the total of instructions

After improving the function's algorithm, we end up with 983040 instructions executed on the function instead.

Assuming that each instruction is executed in one cycle, it asks about the performance improvement after this instruction number reduction.

By calculating the speedUp in CPI before and after in the improved functions (4,9), and then using Amdahl's law, we get an increase of 46,7% in performance.

After this, it asks to calculate the speedUp again, but this time by checking the increase in MFLOPs.

How could this be done if we don't know anything about execution times?

• Please credit the original source of all copied material. Thank you!
– D.W.
Feb 28, 2021 at 8:08

Increase in MFLOPS = $$\dfrac{(Ratio\ of\ Floating\ point\ instructions\ to\ total\ number\ of\ instructions\ after\ improvement)} {(Ratio\ of\ Floating\ point\ instructions\ to\ total\ number\ of\ instructions\ before\ improvement)}$$