<P> It is frequently important to know how much of a particular resource (such as time or storage) is theoretically required for a given algorithm . Methods have been developed for the analysis of algorithms to obtain such quantitative answers (estimates); for example, the sorting algorithm above has a time requirement of O (n), using the big O notation with n as the length of the list . At all times the algorithm only needs to remember two values: the largest number found so far, and its current position in the input list . Therefore, it is said to have a space requirement of O (1), if the space required to store the input numbers is not counted, or O (n) if it is counted . </P> <P> Different algorithms may complete the same task with a different set of instructions in less or more time, space, or' effort' than others . For example, a binary search algorithm (with cost O (log n)) outperforms a sequential search (cost O (n)) when used for table lookups on sorted lists or arrays . </P> <P> The analysis and study of algorithms is a discipline of computer science, and is often practiced abstractly without the use of a specific programming language or implementation . In this sense, algorithm analysis resembles other mathematical disciplines in that it focuses on the underlying properties of the algorithm and not on the specifics of any particular implementation . Usually pseudocode is used for analysis as it is the simplest and most general representation . However, ultimately, most algorithms are usually implemented on particular hardware / software platforms and their algorithmic efficiency is eventually put to the test using real code . For the solution of a "one off" problem, the efficiency of a particular algorithm may not have significant consequences (unless n is extremely large) but for algorithms designed for fast interactive, commercial or long life scientific usage it may be critical . Scaling from small n to large n frequently exposes inefficient algorithms that are otherwise benign . </P> <P> Empirical testing is useful because it may uncover unexpected interactions that affect performance . Benchmarks may be used to compare before / after potential improvements to an algorithm after program optimization . </P>

Explain the two major benefits of creating functions for algorithms