--- In [email protected], Satya Prasad <[EMAIL PROTECTED]>
wrote:
>
> Hi All,
>    
> In order to write efficient program, I was obsessed for
> better efficiency code. I understood that for the same
> we need to have better design and algorithms. And for
> measuring the algo efficiency I should calculate the
> time spend by system. I use the concept of printing
> time before and end of the algorithm execution. 
>    
> Is my concept correct or there is some other efficient
> method of measuring an algorithm efficiency.

Prakash,

measuring the time used by some function is the starting point of
practical performance analysis. However, in general performance
analysis is a pretty tough topic which you should study carefully.
If you have the time, I strongly suggest you get a copy of volume 1 of
Donald Knuth's classic work, The Art Of Computer Programming; in this
volume 1 you will find several chapters about the O-notation and
thorough analysis of many basic algorithms plus introduction on how to
do this on your own algorithms.
Tough stuff to study, but in my opinion worth every minute.

Regards,
Nico

Reply via email to