Computational complexity

In computer science, the computational complexity or simply complexity of an algorithm is the amount of resources required to run it. Particular focus is given to computation time (generally measured by the number of needed elementary operations) and memory storage requirements. The complexity of a problem is the complexity of the best algorithms that allow solving the problem.
— Wikipedia

Complexity is generally expressed by using big O notation.

Time complexity

Time complexity is the way in which the number of steps required by an algorithm varies with the size of the problem it is solving. Time complexity is normally expressed as an order of magnitude, e.g. means that if the size of the problem () doubles then the algorithm will take four times as many steps to complete.
— FOLDOC

Measuring the speed of an operation (how many steps’ operation will take) is also known as measuring its time complexity.

When we measure how “fast” an operation takes, we do not refer to how fast the operation takes in terms of pure time, but instead in how many steps it takes. Measuring operations by steps, allow us to compare operations speed independently of the hardware they are run on.

Space complexity

The way in which the amount of storage space required by an algorithm varies with the size of the problem it is solving.

References