Wednesday 20 May 2020

Performance Analysis

Performance Analysis: 
In computer science, there are multiple algorithms to solve a problem. When we have more
than one algorithm to solve a problem, we need to select the best one. Performance analysis
helps us to select the best algorithm from multiple algorithms to solve a problem.
When there are multiple alternative algorithms to solve a problem, we analyze them and pick
the one which is best suitable for our requirements. The formal definition is as “Performance of
an algorithm is a process of making evaluative judgement about algorithms”.
To compare algorithms, we use a set of parameters or set of elements like memory required by
that algorithm, the execution speed of that algorithm, easy to understand, easy to implement,
etc.,
Generally, the performance of an algorithm depends on the following elements
 Whether that algorithm is providing the exact solution for the problem?
 Whether it is easy to understand?
 Whether it is easy to implement?
 How much space (memory) it requires to solve the problem?
 How much time it takes to solve the problem? Etc.,
When we want to analyse an algorithm, we consider only the space and time required by that
particular algorithm and we ignore all the remaining elements.
Based on this information, performance analysis of an algorithm can also be defined as
"Performance analysis of an algorithm is the process of calculating space and time required by
that algorithm."
Performance analysis of an algorithm is performed by using the following measures...
a. Space required completing the task of that algorithm (Space Complexity). It includes
program space and data space
b. Time required to complete the task of that algorithm (Time Complexity)

0 comments:

Post a Comment