People throw around the term "big O" a lot in the world of computer science. Big O notation as a measure of the efficiency of an algorithm is important, but it doesn't always tell the whole story. For example, a linear scan through a small array (less than a few hundred elements) can be faster than a binary search, even though the binary search is and the linear scan is . Big O notation is a useful abstraction for measuring the amount of operations performed by an algorithm, but it doesn't always capture the real-world performance of an algorithm. Thus, when optimizing code, it's important to measure the actual performance of your code and get your hands dirty with profiling tools, rather than relying on theory alone.
Here are some articles I've written on the topic of optimization: