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:
Efforts for an optimized code can be made at various levels of compiling the process.
Optimization can be categorized broadly into two types : machine independent and machine dependent.