Social Sciences, asked by sreenath4749, 1 year ago

Different type of loop optimization in compiler design

Answers

Answered by RaviKumarNaharwal
1
Optimization is a program transformation technique, which tries to improve the code by making it consume less resources (i.e. CPU, Memory) and deliver high speed.

In optimization, high-level general programming constructs are replaced by very efficient low-level programming codes. A code optimizing process must follow the three rules given below:

The output code must not, in any way, change the meaning of the program.

Optimization should increase the speed of the program and if possible, the program should demand less number of resources.

Optimization should itself be fast and should not delay the overall compiling process.

Efforts for an optimized code can be made at various levels of compiling the process.

At the beginning, users can change/rearrange the code or use better algorithms to write the code.

After generating intermediate code, the compiler can modify the intermediate code by address calculations and improving loops.

While producing the target machine code, the compiler can make use of memory hierarchy and CPU registers.

Optimization can be categorized broadly into two types : machine independent and machine dependent.

Answered by Amayra1440
3

here is uhr answer!

hope it helps

Attachments:
Similar questions