Search code examples
performancealgorithmprofilingcomplexity-theorybig-o

Do you use Big-O complexity evaluation in the 'real world'?


Recently in an interview I was asked several questions related to the Big-O of various algorithms that came up in the course of the technical questions. I don't think I did very well on this... In the ten years since I took programming courses where we were asked to calculate the Big-O of algorithms I have not have one discussion about the 'Big-O' of anything I have worked on or designed. I have been involved in many discussions with other team members and with the architects I have worked with about the complexity and speed of code, but I have never been part of a team that actually used Big-O calculations on a real project. The discussions are always "is there a better or more efficient way to do this given our understanding of out data?" Never "what is the complexity of this algorithm"?

I was wondering if people actually have discussions about the "Big-O" of their code in the real world?


Solution

  • It's not so much using it, it's more that you understand the implications.

    There are programmers who do not realise the consequence of using an O(N^2) sorting algorithm.

    I doubt many apart from those working in academia would use Big-O Complexity Analysis in anger day-to-day.