2022-01-07

Another pitfall cited is expecting to improve the overall performance of a computer by improving only one aspect of the computer. Consider a computer running a program that requires 250 s, with 70 s spent executing FP instructions, 85 s executed L/S instructions, and 40 s spent executing branch instructions.
1. By how much is the total time reduced if the time for FP operations is reduced by 20%?
2. By how much is the time for INT operations reduced if the total time is reduced by 20%?
3. Can the total time can be reduced by 20% by reducing only the time for branch instructions?

maul124uk

Step 1
1. The new time required to run FP operations is
$0.8×70s=56s$
So, the new time required to run the program is
$250-\left(70-56\right)=236s$
(because we reduced the time of execution by $70-56=14$
2. The new total time of executions is
$0.8×250=200s$
If we assume that we changed only the time needed to execute INT operations, the new time needed to execute INT operations is
$200-70-85-40=5s$
Since the old time was $250-70-85-40=55$ seconds, and $\frac{5}{55}=0.09$,
this is the decrease of a whooping 91%!
3. Lets

Ethan Sanders

a) For this case the new time to run the FP operation would be reduced 20% so that means $100-20\mathrm{%}=80\mathrm{%}$ from the original time
$\left(1-0.2\right)\cdot 70s=56s$
The reduction on this case is $70-56s=14s$
And since the new total time would be given by $250-14=236s$
b) For this case the total time is reduced 20% so that means that the new total time would be $\left(1-0.2\right)=0.8$ times the original total time $\left(1-0.2\right)\cdot 250s=200s$
The original time for INT operations is calculated as:
$250=70+85+40+{t}_{INT}$
${t}_{INT}=55s$
For this part the only time that was changed is assumed the INT operations so then:
$200=70+85+40\mathrm{△}{t}_{INT}$
And then: $\mathrm{△}{t}_{INT}=200-70-85-40=5s$
c) A reduction of the total time implies that the total time would be 205 s from the results above. And the time for FP is 70, for L/S is 85 and for INT operations is 55 s, so then if we add $70+85+55=210s$, we see that $210>205$ so then we cannot reduce the total time 20% just reducing the branch intructions.
Explanation: From the info given we know that a computer running a program that requires 250 s, with 70 s spent executing FP instructions, 85 s executed L/S instructions and 40 s spent executing branch instructions.
Part 1 For this case the new time to run the FP operation would be reduced 20% so that means $100-20\mathrm{%}=80\mathrm{%}$ from the original time
$\left(1-0.2\right)\cdot 70s=56s$
The reduction on this case is $70-56s=14s$
And since the new total time would be given by $250-14=236s$
Part 2
For this case the total time is reduced 20% so that means that the new total time would be $\left(1-0.2\right)=0.8$ times teh original total time $\left(1-0.2\right)\cdot 250s=200s$
The original time for INT operations is calculated as:
$250=70+85+40+{t}_{INT}$
${t}_{INT}=55s$
For this part the only time that was changed is assumed the INT operations so then:
$200=70+85+40\mathrm{△}{t}_{INT}$
And then: $\mathrm{△}{t}_{INT}=200-70-85-40=5s$
And we can quantify the decrease using the relative change:
$\mathrm{%}Change=\frac{5s}{55s}\cdot 100=9.09\mathrm{%}$ of reduction
Part 3
A reduction of the total time implies that the total time would be 205s from the results above. And the time for FP is 70, for L/S is 85 and for INT operations is 55s, so then if we add $70+85+55=210s$, we see that $210>205$ so then we cannot reduce the total time 20% just reducing the branch intructions.

karton

1) 236 s
2) 91%
3) no
Explanation:
solution:
The new time required to run FP operations is

0.8  * 70 s = 56 s
So, the new time required to run the program is
250 - (70 - 56) = 236 s (because we reduced the time of execution by 70 - 56 = 14 seconds).
The new total time of execution is

0.8 * 250 = 200s
If we assume that we changed only the time needed to execute INT operations, the new time needed to execute INT operations is
200 - 70 - 85 - 40 = 5 s
Since the old time was 250 - 70 - 85 - 40 = 55 seconds, and
$\frac{5}{55}=0.09$
this is the decrease of a whooping 91%!
Let's assume that we completely avoid using branch operations. Then the time of execution is
$55+70+85=205$
This is the decrease of 18%, since $\frac{205}{250}=0.82$ This means that we cannot decrease the total time by 20% by just decreasing the time of branch operations.

nick1337

Step 1. To find the reduction in total time when the time for FP operations is reduced by 20%, we can calculate the new time for FP operations using the given reduction and then subtract it from the original total time.
Let's denote the original total time as $T$. The time for FP operations is given as 70 s. To reduce it by 20%, we multiply it by 0.8 (1 - 0.2) to get the new time for FP operations:
New time for FP operations = $70×0.8=56$ s.
The new total time, denoted as ${T}^{\prime }$, can be calculated as:

${T}^{\prime }=T-\left(70-56\right)$ s
Now, to calculate the reduction in total time, we subtract the new total time from the original total time:
Reduction in total time = $T-{T}^{\prime }$
Step 2. To find the reduction in time for INT operations when the total time is reduced by 20%, we can calculate the new total time using the given reduction and then find the proportion of time for INT operations in the new total time.
Let's denote the original total time as $T$ and the time for INT operations as ${T}_{\text{INT}}$. We know that .
To find the reduction in total time, we multiply the original total time $T$ by 0.8 (1 - 0.2) to get the new total time ${T}^{\prime }$:
${T}^{\prime }=T×0.8$
To find the reduction in time for INT operations, we can calculate the proportion of time for INT operations in the new total time ${T}^{\prime }$:
Reduction in time for INT operations =
Step 3. To determine if the total time can be reduced by 20% by reducing only the time for branch instructions, we need to compare the reduction in time for branch instructions with the desired reduction in total time.
Let's denote the original total time as $T$ and the time for branch instructions as ${T}_{\text{branch}}$. We want to reduce the total time by 20%, which means the new total time ${T}^{\prime }$ should be 80% of the original total time:
${T}^{\prime }=T×0.8$
To check if reducing only the time for branch instructions can achieve this reduction, we need to calculate the reduction in time for branch instructions and compare it with the desired reduction in total time:
Reduction in time for branch instructions = ${T}_{\text{branch}}×0.2$
If the reduction in time for branch instructions is equal to or greater than the desired reduction in total time, then reducing only the time for branch instructions can achieve the 20% reduction in total time.

Don Sumner

1. The following method can be used to calculate the reduction in overall time when the time required for FP operations is 20% less:

Substituting the given values:

Plugging in these values, we can calculate the reduction in total time:

Therefore, the total time is reduced by approximately 69.86 s when the time for FP operations is reduced by 20%.
2. To find the reduction in time for INT operations when the total time is reduced by 20%, we need to determine the proportion of time spent on INT operations in the original total time. Then, we can calculate the reduction in time for INT operations using the following formula:

Given values:
Original time for INT operations = 85 s
Original total time = 250 s
Reduction in total time = 20% = 0.2
Plugging in these values, we can calculate the reduction in time for INT operations:

Therefore, the time for INT operations is reduced by approximately 0.068 s when the total time is reduced by 20%.
3. To determine if the total time can be reduced by 20% by reducing only the time for branch instructions, we need to consider the original time distribution and the percentage reduction required.
Given:
Original total time = 250 s
Original time for branch instructions = 40 s
Percentage reduction required = 20% = 0.2
To achieve a 20% reduction in total time, we need to determine if reducing the time for branch instructions by 20% alone is sufficient.

Let's calculate the reduction in total time with only the time for branch instructions reduced:

Since the reduction achieved is less than 20% of the original total time (250 s), it is not possible to reduce the total time by 20% by reducing only the time for branch instructions.
Therefore, reducing only the time for branch instructions is not sufficient to achieve a 20% reduction in the total time.

Do you have a similar question?