empirical analysis this has focused on asymptotic analysis this is an analytic toolwhereby we model the key aspects of an algorithm to determine the growth rate of the algorithm as the input size grows as pointed out previouslythere are many limitations to this approach these include the effects at small problem sizedetermining the finer distinctions between algorithms with the same growth rateand the inherent difficulty of doing mathematical modeling for more complex problems an alternative to analytical approaches are empirical approaches the most obvious empirical approach is simply to run two competitors and see which performs better in this way we might overcome the deficiencies of analytical approaches be warned that comparative timing of programs is difficult businessoften subject to experimental errors arising from uncontrolled factors (system loadthe language or compiler usedetc the most important point is not to be biased in favor of one of the programs if you are biasedthis is certain to be reflected in the timings one look at competing software or hardware vendorsadvertisements should convince you of this the most common pitfall when writing two programs to compare their performance is that one receives more code-tuning effort than the other as mentioned in section code tuning can often reduce running time by factor of ten if the running times for two programs differ by constant factor regardless of input size ( their growth rates are the same)then differences in code tuning might account for any difference in running time be suspicious of empirical comparisons in this situation another approach to analysis is simulation the idea of simulation is to model the problem with computer program and then run it to get result in the context of algorithm analysissimulation is distinct from empirical comparison of two competitors because the purpose of the simulation is to perform analysis that might otherwise be too difficult good example of this appears in figure this figure shows the cost for inserting or deleting record from hash table under two different assumptions for the policy used to find free slot in the table the axes is the cost in number of hash table slots evaluatedand the axes is the percentage of slots in the table that are full the mathematical equations for these curves can be determinedbut this is not so easy reasonable alternative is to write simple variations on hashing by timing the cost of the program for various loading conditionsit is not difficult to construct plot similar to figure the purpose of this analysis is not to determine which approach to hashing is most efficientso we are not doing empirical comparison of hashing alternatives insteadthe purpose is to analyze the proper loading factor that would be used in an efficient hashing system to balance time cost versus hash table size (space cost