Encyclopedia > Best-case performance

  Article Content

Best-case performance

The term best-case performance is used in computer science to describe the way an algorithm behaves under optimal conditions. For example, a simple linear search on an array has a worst case performance O(n), when the algorithm has to check every element, and average running time is O(n/2) (see Big O notation), when the item to be found is around the middle of an array, but in best-case running time, the first element that the linear search looks at is the element the algorithm was searching for, and best-case running time is O(1).

It is not practical to base algorithm analysis solely on best-case performance, because most academic and professional industries are more interested in improving worst-case performance and average performance scenarios, as they occur more often than best-case scenarios.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Shoreham, New York

... under the age of 18 living with them, 74.5% are married couples living together, 8.3% have a female householder with no husband present, and 13.1% are non-families. 11.0% of ...

 
 
 
This page was created in 69.8 ms