Hi Kalim, first of all any algorithm is characterized by a given convergence rate (linear, superlinear, quadratic). Thus, the number of iterations will be greater for a linearly convergent algorithm than for a quadratically convergent one for example. Second point, at each iteration the algorithm may need to evaluate an external function. It is clear that if the CPU time required to evaluate this function is important, the total CPU time required by the algorithm will be great too. Third point, a given algorithm may be implemented more or less efficiently leading to more or less CPU time at the end. best
Computational time of an algorithm depends on a lot of factors. However, those factors are problem-specific. First of all, problem size could be a big factor. For instance for the traveling salesman problem, the number of cities is a major factor that affects the computational time. For a general integer programming problem, the number of variables and the number of constraints will affect the computation time greatly. So, the theoretical bounds and performance estimates for computational time will be based on problem parameters. What makes an algorithm faster than another? Could be many things. You have to compare specific algorithms together, considering a specific problem. A smarter way to process nodes, rows, etc., whatever your algorithm does iteratively, will lead to faster performance. It cannot be generalized.
Thankyou for exlaination, but if we run both algorithms for 1 problem, parameters in that case are same for both the techniques, still one algorithm works faster than other, what should be the reason in that case?
The efficiency of some algorithms is a basic topic called the algorithm's complexity, the time needed to perform the algorithm, which depends on the minimum steps needed to perform the needed calculations. It would be best if you learned about big "O" and small "o" notations.
For more information, see the following references:
Two main reasons: (1) The nature of the computational complexity of the two algorithms. One could require more mathematical steps to achieve a given output compared to another. (2) The way the algorithm was coded to begin with. I mean, of course, if short-cuts were added to enhance computational performance. In MATLAB, for instance, the replacement of "for" loops with vector operations have been proven to reduce computational time significantly.
These two points are true only if the algorithm's solve the same problem.