Contents    Page-10    Prev    Next    Page+10    Index   

Optional Optimization

Some compilers either allow the optimizer to be turned off, or require that optimization be requested explicitly.

Reasons for turning optimization off:

With some sophisticated compilers, the users normally turn the optimizer off! This is because the optimizer has the reputation of generating incorrect code.

Optimizations that don't take much compilation time and are guaranteed to be correct should probably be done every time. A slightly longer compilation time is almost always compensated by faster execution.