Thread: O() notation
View Single Post
  #13 (permalink)  
Old 03-28-2008, 12:13 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,379
Last Blog:
wxWidgets is NOT code ...
Rep Power: 37
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default Re: O() notation

O() gives you a measure of algorithmic efficiency. If you have an algorithm that is O(x), it is fundamentally more efficient than O(x^2). The actual values for the algorithms may be 1000x+1000 vs x^2, but after a while, the x^2 version still becomes worse. Algorithms are usually measured in efficiency against memory usage or speed. They are also sometimes rated against average and worst-case efficiency (quicksort has different values).

If you analyze the efficiency of your code, it will generally help you determine where to start making changes and what can be left alone.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Reply With Quote