complexity the most important thing to think about when designing and implementing program is that it should produce results that can be relied upon we want our bank balances to be calculated correctly we want the fuel injectors in our automobiles to inject appropriate amounts of fuel we would prefer that neither airplanes nor operating systems crash sometimes performance is an important aspect of correctness this is most obvious for programs that need to run in real time program that warns airplanes of potential obstructions needs to issue the warning before the obstructions are encountered performance can also affect the utility of many non-real-time programs the number of transactions completed per minute is an important metric when evaluating the utility of database systems users care about the time required to start an application on their phone biologists care about how long their phylogenetic inference calculations take writing efficient programs is not easy the most straightforward solution is often not the most efficient computationally efficient algorithms often employ subtle tricks that can make them difficult to understand consequentlyprogrammers often increase the conceptual complexity of program in an effort to reduce its computational complexity to do this in sensible waywe need to understand how to go about estimating the computational complexity of program that is the topic of this thinking about computational complexity how should one go about answering the question "how long will the following function take to run?def ( )"""assumes is an int and > ""answer while > answer * - return answer we could run the program on some input and time it but that wouldn' be particularly informative because the result would depend upon the speed of the computer on which it is run the efficiency of the python implementation on that machineand the value of the input we get around the first two issues by using more abstract measure of time instead of measuring time in millisecondswe measure time in terms of the number of basic steps executed by the program