The goal of code optimization is to discover, at compile time, information about the runtime behavior of the program and to use that information to improve the code that the compiler generates. Improvement can take many forms.

  • make the compiled code run faster
  • the size of the compiled code outweighs its speed
  • reducing the energy cost of execution
  • improving the code’s response to real-time events, and reducing total memory traffic