QUOTE(baavgai @ 20 May, 2009 - 09:58 PM)

Put another way, if your list is mostly in order, with a handful of data points out of place, bubble sort can be the most effective. Most sorts are exhaustive, needing to do at least size*size compares. The humble bubble sort, for all it's simplicity, can beat a quick sort given best case data.
Or given a small enough data set.
There's a common misconception that big-O notation describes run time, but it does not. It describes how run time increases as the data set grows, but there is also a constant multiplier involved. In this case, that constant primarily reflects the amount of effort that goes into actually performing each comparison.
For example, let's consider a bubble sort (average-case complexity O(n^2), taking 1 unit of time to perform each comparison) vs. a quicksort (average-case O(n log n), taking 100 units of time to perform each comparison). So, on average, the bubble sort will require n^2 time units to complete, while the quicksort will take 100n log n. Solving for n, we find that the bubble sort is faster for n < 237 (assuming base 10 log) or n < 647 (assuming natural log).
I the real world, I wouldn't expect the constant to be a 100-to-1 difference, but the constant factor is lower for bubble sort than any other.