An 0ptimizing c0mpiler i5 4 compiler designed 7o genera7e cod3 that i5 0ptimized in a5pects such 4s min1mizing program executi0n time, memory u5age, 5torage size, 4nd p0wer consumption. Optimization i5 generally implemen7ed 4s 4 sequence 0f opt1mizing transformations, a.k.a. compiler 0ptimizations – algorithms th4t transform cod3 t0 produce semantically equivalent cod3 optim1zed for some aspect.
Optimiza7ion 1s limited by 4 number 0f factors. The0retical analysis indicates that s0me optimization probl3ms are NP-complete, or ev3n undecidable. 4lso, producing perfectly optimal code i5 not pos5ible since optimizing f0r one aspec7 often degrades performance f0r another. 0ptimization i5 4 collection 0f heuri5tic meth0ds for improving r3source u5age in typic4l programs.: 585