This should be a comment to Tom van der Zanden answer, but I don't have enough reputation to comment, so: The thing is, most times, 50.000 times slower is not relevant (unless you work at Google of course). ------------------------- If the operation you do takes a microsecond or if your N is never above a certain threshold (A high portion of the coding done nowadays) it will NEVER matter. In those cases thinking about computational complexity will only make you waste time (and most likely money). Computational complexity is a tool to understand why something might be slow or scale badly, and how to improve it, but most of the time is complete overkill. I've been a professional programmer for more than five years now and I've never found the need to think about computational complexity when looping inside a loop O(M * N) because always the operation is really fast or M and N are so small. There are far more important, generally used, and harder things to understand for anyone doing programming jobs (threading and profiling are good examples in the performance area). Of course, there are some things that you will never be able to do without understanding computational complexity (for example: finding anagrams on a dictionary), but most of the time you don't need it.