A beginner's guide to Big O notation (2009)
> O(N) describes an algorithm whose performance will grow linearly and in direct proportion to the size of the input data set.Argh, I hate this every time I see Big O notation covered.Big O != performance. If you have an O(N) algorithm that walks the data set in the order that it's laid out in memory(assuming contiguous data) it will beat your O(NlogN) and sometimes even O(logN).[edit]meant to omit nlogn, that's what I get for any early morning rant pre-coffee.Radix Sort is the classic example I always bring up. On machine word size keys, with a separate pointer look-up table(to get final value) it will beat QSort, MergeSort and all the other NlogN sorts by 10-50x. This includes having to walk the data 3-4 times depending on how you want to split the radix to line up with cache sizes.Friends don't let Friends use Big O to describe absolute performance.