0
$\begingroup$

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?

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

1 Answer 1

1
$\begingroup$

You can calculate the speedup in MFLOPs. Speedup is a dimensionless quantity, so you don't need to know the execution time to calculate it.

You need to know the old execution time only if you need to find out the improved execution time.


In this problem, we can calculate the increase in MFLOPS by dividing the ratio of Floating point instructions to total number of instructions after improvement by the ratio of Floating point instructions to total number of instructions before improvement, since the Cycles Per Instruction is 1 and clock cycle time remains the same.

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)} $

$\endgroup$
2
  • $\begingroup$ Thanks, that's true, but I still don't see how could I exactly get that out of this data. Maybe if I compare the % of time spent in floating point operations before and after the change? though that gives me a 91% increase which seems off to me. $\endgroup$
    – Lightsong
    Commented Feb 27, 2021 at 19:37
  • 1
    $\begingroup$ @Lightsong See my edit, hope it helps $\endgroup$ Commented Feb 28, 2021 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.