So as the question focuses on improving speedup, We can use Amdahl’s Law to estimate performance improvements when we know the time consumed for some function and its potential speedup.
Amdahl’s Law: A rule stating that the performance enhancement possible with a given improvement is limited by the amount that the improved feature is used. It is a quantitative version of the law of diminishing returns. In other words: Don’t expect an enhancement proportional to how much you enhanced something.
Potential speedup = 5 (given), Old execution time = 100, Since we want the performance to be five times faster, the new execution time should be = 100/5 = 20 seconds.
As stated in the question- “program runs in 100s. multiplies 80% of the program” so multiply operations responsible for 80 seconds of this time.
So the execution time that is affected is the 80s and the execution time that is unaffected is 100-80 = 20s
The execution time of the program after making the improvement is given by the following simple equation-
Execution time new = Execution time unaffected + ( Execution time affected by improvement / Amount of Improvement )
20s = 20s + 80s/n
80s/n = 0
So if multiply accounts for only 80% of the workload then there is no amount by which we can enhance multiply to achieve a fivefold increase in performance.
Ref- CO-Patterson-Hennessy-5th edition-1st Chapter & PDF(Slide number 45 and 48)