Program Optimization - Trade-offs

Trade-offs

Optimization will generally focus on improving just one or two aspects of performance: execution time, memory usage, disk space, bandwidth, power consumption or some other resource. This will usually require a trade-off — where one factor is optimized at the expense of others. For example, increasing the size of cache improves runtime performance, but also increases the memory consumption. Other common trade-offs include code clarity and conciseness.

There are instances where the programmer performing the optimization must decide to make the software better for some operations but at the cost of making other operations less efficient. These trade-offs may sometimes be of a non-technical nature — such as when a competitor has published a benchmark result that must be beaten in order to improve commercial success but comes perhaps with the burden of making normal usage of the software less efficient. Such changes are sometimes jokingly referred to as pessimizations.

In some cases, a snippet of code can become so optimized as to be obfuscated. This can lead to difficulty in maintaining the code.

Read more about this topic:  Program Optimization

Famous quotes containing the word trade-offs:

    Realistic about how much one person can accomplish in a given day, women expect to have to make some trade-offs between work and family. Families, however, have absorbed all the stress and strain they possibly can. The entire responsibility for accommodation is taking place on the home side of the equation.
    Deborah J. Swiss (20th century)

    Work-family conflicts—the trade-offs of your money or your life, your job or your child—would not be forced upon women with such sanguine disregard if men experienced the same career stalls caused by the-buck-stops-here responsibility for children.
    Letty Cottin Pogrebin (20th century)