In the timing experiments of the previous section, you may have noticed that the computer takes approximately the same time to increment a number, even though the number was made progressively larger.  Computer scientists (programmers and theorists) thus call incrementing a number a constant-time operation.  In fact, any basic arithmetic operation (addition, subtraction, multiplication, division, and exponentiation) is considered to be a constant-time operation.

    Notice that we call these operations constant-time operations, but we don't actually say how much time they take.  Different computers will take different amounts of time to perform the same operation.  To report the exact time of any algorithm, we would have to also report the physical configurations of the computer that the algorithm was run on.  This gets very difficult and annoying very fast, especially with the almost infinite variety of computers available today.  Instead, we focus on how the running time of an algorithm scales as we scale its inputs to larger and larger sizes, because this is a property of the algorithm itself, and is independent of the computer that it is run on.

    Why did the computer take approximately the same amount of time to increment a number, even though that number was getting larger?  Think about how you would add one to a number, back from your elementary school days; this is similar to how a computer does its arithmetic (ignoring technical details).  The elementary school way of adding numbers goes digit by digit, and so the amount of time it takes for you to add two numbers depends on how many digits each number has.  As we doubled the number we were incrementing, we didn't consistently add digits to it, and so the computer took approximately the same time.  Even as we began scaling the number by ten, the computer (and you!) takes a relatively small amount of time to account for the extra digit, so the total time remains approximately constant.

    Constant-time operations are the Holy Grail of computer science algorithms, and unfortunately, most algorithms are not constant-time, as we will soon see.