Security Encyclopedia

Running Time

The running time of an algorithm refers to the length of time it takes for it to run as a function.

An algorithm’s running time for a given input depends on the number of operations executed. An algorithm with more operations will have a lengthier running time. The number of operations of an algorithm in proportion to the size of an input also affects the algorithm’s running time. 

Time complexity and space complexity are also ways of looking at algorithms. The former is an expression of how long it takes for the algorithm to run as a function of the length of the input. The latter expresses the total amount of space or memory that it occupied during this process.


“An uncommonly complex algorithm with requiring many minute functions will have a longer running time than a basic ‘if, then’ statement.”