DO NOT USE THIS TAG. It is in the process of being eliminated. If your question is just about performance, use the [performance] tag.

In computer science, program or software optimization is the process of modifying a system to make some aspect of it work more efficiently or use fewer resources. In general, a computer program may be optimized so that it executes more rapidly, or is capable of operating with less memory storage or other resources, or draw less powerWikipedia. Other resources may include disk access, communication bandwidth, video performance and user interface responsiveness.

is a subset of . Use the tag when your concern is specifically about optimizing the run-time of a program ('Performance Optimization').

Apart from the software itself, other areas that are commonly optimized are:

  • disk space usage
  • memory usage
  • network/database connections
  • etc.

Additionally, it is common for programs to solve combinatorial optimization problems:

Common places in software that are optimized are:

  • Design or algorithm efficiency.
  • Source code level. For example Duff's Device.
  • Build level or optimizer flags, often trading build time for run-time efficiency.
  • Compile level; choosing the best compiler.
  • Assembly level. The best machine mapping to a problem
  • Run time. Examples include virtual machine parameters and profile guided optimization.

A common cited peril of optimizing is premature optimization. Optimization often has consequences in regard to program complexity and maintainability. In contrast, the most dramatic effect on optimization is at the Design Level via algorithm efficiency; this is the earliest stage of development leading to a paradox.