Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 2
Performance Analysis:
Efficiency of an algorithm can be decided by measuring the
performance of algorithm. Performance Analysis deals with two factors Space Complexity: It is defined as amount of memory required by an algorithm to run. Space Complexity: The amount of space taken by an algorithm to store variable. Two factors are used to compute space complexity Fixed Part: Independent of input and output characteristics. It includes instruction space, Space for variables, Space for constants and so on. Variable Part: It is also called as dynamic part.It includes Space needed by reference variables, Recursion stack space and so on. Let P be an algorithm, then total space required for algorithm is S(P)=C+Sp Where C is constant which is fixed space and Sp is variable space which varies depend on the problem
Time Complexity: The amount of time required by an
algorithm to complete its execution. Time Complexity: The amount of time taken by an algorithm to run. Two factors are used to compute time complexity. Compile Time: Does not depend on instance characteristics Run Time: Depend on particular problem instance Let P be an algorithm, then total time required for algorithm is T(P)=C+Tp, here c is compile time and Tp is runtime The algorithm analysis framework consists of following
1.Measuring Input’s Size
2. Measuring running time 3. Order of Growth 4. Best case, Worst case and Average case – Efficiencies 5. Recapitulation of the Analysis Framework