Tradeoff usually refers to losing one quality or aspect of something in return for gaining another quality or aspect.

In computing, there is often some tradeoff to be made when trying to improve the perfomance of a computer system, as shown by the following examples:

  • By compressing an image you can reduce transmission time/costs at the expense of CPU time to perform the compression and decompression.
  • By using a preset table you may be able to reduce CPU time at the expense of space to hold the table, e.g. to determine the parity of a byte you can either look at each bit individually (using shifts and masks), or use a 256-entry table giving the parity for each possible bit-pattern.
  • For some situations (e.g. string manipulation) a compiler may be able to use inline code for greater speed, or call run-time routines for reduced memory; the user of the compiler should be able to indicate whether speed or space is more important.