Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Most of the application programs consist of loop structures (e.g., for loops and

ID: 3868542 • Letter: M

Question

Most of the application programs consist of loop structures (e.g., for loops and while loops). The term "the size of a loop structure" refers to the number of instructions in a loop structure (i.e., the instruction count from the beginning to the end of a loop structure - see the figure below). Suppose that programmers do not apply any compile-time code optimization techniques, such as loop-unrolling, what is the impact of "the size of a loop structure" to the performance (execution speed) improvement for a tightly-coupled multi-processor system? Technically justify your response.

Explanation / Answer

The programmers who don't apply any compile-time code optimization techniques, the impact of "the size of a loop structure" to the performance for a tightly-couple multi-processor system is effected negatively.It will decrease the performance of the loop.As,execution times increases to very high state and also the pressure of the program on the processor increases and also the memory size increases.
For example:-
Suppose,they are 4 lines in a loop.And,with optimization we can increase it to 3 lines.Even though it seems that we are just 1 line difference.But, in a loop the case is much difference.Because main factor is how many times the loop is executed.So,if the loop continues for 10 iterations.Then,total times the lines are executed are 4*10 = 40 lines. And,with optimization 3*10 = 30 lines. See ,if we even consider 1 line = 1 clock cycle.Then , we just wasted 10 clock cycles.And, the stack size increases if the loop has a function call in it which occupies the ram memory also.Due to which performance will decrease

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote