Another pitfall cited is expecting to improve the overall performance

Tara Alvarado

Tara Alvarado

Answered question

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?

Answer & Explanation

maul124uk

maul124uk

Beginner2022-01-08Added 35 answers

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(7056)=236s
(because we reduced the time of execution by 7056=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
200708540=5s
Since the old time was 250708540=55 seconds, and 555=0.09,
this is the decrease of a whooping 91%!
3. Lets
Ethan Sanders

Ethan Sanders

Beginner2022-01-09Added 35 answers

Answer:
a) For this case the new time to run the FP operation would be reduced 20% so that means 10020%=80% from the original time
(10.2)70s=56s
The reduction on this case is 7056s=14s
And since the new total time would be given by 25014=236s
b) For this case the total time is reduced 20% so that means that the new total time would be (10.2)=0.8 times the original total time (10.2)250s=200s
The original time for INT operations is calculated as:
250=70+85+40+tINT
tINT=55s
For this part the only time that was changed is assumed the INT operations so then:
200=70+85+40tINT
And then: tINT=200708540=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 10020%=80% from the original time
(10.2)70s=56s
The reduction on this case is 7056s=14s
And since the new total time would be given by 25014=236s
Part 2
For this case the total time is reduced 20% so that means that the new total time would be (10.2)=0.8 times teh original total time (10.2)250s=200s
The original time for INT operations is calculated as:
250=70+85+40+tINT
tINT=55s
For this part the only time that was changed is assumed the INT operations so then:
200=70+85+40tINT
And then: tINT=200708540=5s
And we can quantify the decrease using the relative change:
%Change=5s55s100=9.09% 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

karton

Expert2022-01-11Added 613 answers

Answer:
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
555=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 205250=0.82 This means that we cannot decrease the total time by 20% by just decreasing the time of branch operations.

nick1337

nick1337

Expert2023-05-27Added 777 answers

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, can be calculated as:
T=T(original time for FP operationsnew time for FP operations)
T=T(7056) s
Now, to calculate the reduction in total time, we subtract the new total time from the original total time:
Reduction in total time = TT
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 TINT. We know that TINT=T(time for FP operations+time for L/S operations+time for branch operations).
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:
T=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:
Reduction in time for INT operations = TINT×(T(time for FP operations+time for L/S operations+time for branch operations)T)
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 Tbranch. We want to reduce the total time by 20%, which means the new total time T should be 80% of the original total time:
T=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 = Tbranch×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

Don Sumner

Skilled2023-05-27Added 184 answers

1. The following method can be used to calculate the reduction in overall time when the time required for FP operations is 20% less:
{Reduction in total time}={Original time for FP operations}×(1Percentage reduction in time for FP operations100)
Substituting the given values:
{Original time for FP operations}=70{ s}
{Percentage reduction in time for FP operations}=20%=0.2
Plugging in these values, we can calculate the reduction in total time:
{Reduction in total time}=70×(10.2100)=70×(10.002)=70×0.998=69.86{ s}
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:
{Reduction in time for INT operations}={Original time for INT operations}×Reduction in total timeOriginal total time
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:
{Reduction in time for INT operations}=85×0.2250=85×0.0008=0.068{ s}
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.
{Reduction in total time with branch instructions only}={Original total time}×(1Percentage reduction in time for branch instructions100)
Let's calculate the reduction in total time with only the time for branch instructions reduced:
{Reduction in total time with branch instructions only}=250×(10.2100)=250×0.998=249.5{ s}
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?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?