202k views
5 votes
Memory operations currently take 30% of execution time of program A. A new widget called a "cache" speeds up 80% of memory operations by a factor of 4. A second new widget called a "L2 cache" speeds up half of the remaining 20% by a factor of 2. What is the total speed up?

User Fupsduck
by
3.6k points

1 Answer

5 votes

Answer:

The answer is "1.24"

Step-by-step explanation:

Formula:


\bold {Speedup= (1)/((1 - non-speedup-portion) +(Speed up portion 1))+((speed up-portion \ 2))/( speedup\ 2)+ ....}\\\\Given value:

Operations in the memory = 30%

= 0.3

80% Memory
= 0.3 * 80\%


=
((0.3 * 80) )/(100)


= 0.24

Now it takes 0.06 seconds, saved 0.18 seconds.

20% of the memory operations:


= 0.3 * 20\% \\\\= ((0.3 * 20))/(100) \\\\= 0.06

Half of the other 20% = 0.03

It takes 0.015 seconds now, saved 0.015 seconds, saved 0.195 seconds.

It takes 0.805 seconds in the 1 second.


Speedup = \frac{1} {0.7 + 0.3* (0.8)/(4)} + 0.3*0.2*(0.5)/(2) + 0.3*0.2*0.5


Speedup = 1.2422

User Elliotrock
by
3.9k points