How can I found which part of program is time consuming

please guide me that how can i find in future that which part of my program or which function is taking more time or what else should i use to optimize my code
can you please give me any references from where i can read about optimization
thanks all

To find such things one have to use profiler. I do not have practical experience with such things in C/C++, but when I tried to use Google I found

Hope it helps :wink:

thanks for the link i will try it as soon as possible
can you please suggest me how to learn to optimize my code or which logic or techniques should i keep in mind while writing the code

i downloaded codeanalyst as well as very sleepy
but unable to use them i think that they are not of my use

@nishant_25 I converted your comment from your previous question to separate question, to discuss this new topic here :wink:

thanks @bettista for converting it to a new question