experimental studies if an algorithm has been implementedwe can study its running time by executing it on various test inputs and recording the time spent during each execution simple approach for doing this in python is by using the time function of the time module this function reports the number of secondsor fractions thereofthat have elapsed since benchmark time known as the epoch the choice of the epoch is not significant to our goalas we can determine the elapsed time by recording the time just before the algorithm and the time just after the algorithmand computing their differenceas followsfrom time import time start time timerun algorithm end time timeelapsed end time start time record the starting time record the ending time compute the elapsed time we will demonstrate use of this approachin to gather experimental data on the efficiency of python' list class an elapsed time measured in this fashion is decent reflection of the algorithm efficiencybut it is by no means perfect the time function measures relative to what is known as the "wall clock because many processes share use of computer' central processing unit (or cpu)the elapsed time will depend on what other processes are running on the computer when the test is performed fairer metric is the number of cpu cycles that are used by the algorithm this can be determined using the clock function of the time modulebut even this measure might not be consistent if repeating the identical algorithm on the identical inputand its granularity will depend upon the computer system python includes more advanced modulenamed timeitto help automate such evaluations with repetition to account for such variance among trials because we are interested in the general dependence of running time on the size and structure of the inputwe should perform independent experiments on many different test inputs of various sizes we can then visualize the results by plotting the performance of each run of the algorithm as point with -coordinate equal to the input sizenand -coordinate equal to the running timet figure displays such hypothetical data this visualization may provide some intuition regarding the relationship between problem size and execution time for the algorithm this may lead to statistical analysis that seeks to fit the best function of the input size to the experimental data to be meaningfulthis analysis requires that we choose good sample inputs and test enough of them to be able to make sound statistical claims about the algorithm' running time