Algorithm - Cost (Performance Metrics)

> Code - (Programming|Computer) Language > Algorithm

Table of Contents

1 - About

The performance of algorithm is described using words such as:

  • constant-time,
  • log,
  • linear,
  • n log(n),
  • and quadratic (for instance compare each pair)

to refer to the asymptotic upper-bound on the time complexity of performing the operation.

This sort of performance metric has its limitations. Sometimes, the nominally slower implementation may be faster. When in doubt, measure the performance!

Advertising