The previous answers are correct.
However, IMHO, profilers have more smoke than guns, and I am sure that this causes some arrows to be pressed.
If you want to know how long a function answers, you need to know how many times it is called and how long it takes when it is called. One of them is useless without the other.
Even if he tells you both, he does not tell you which statements within the function are responsible for the time. They tell you a lot of things, such as annotated call schedules and much more, but they are still in the form of a lot of clues that you need to solve, making your assumptions more “informed”.
Then they talk about how the "exact" numbers are. Makes a pleasant presentation, but does not fix the problem.
What they can do (and they do not) indicates specific instructions or instructions and will say
This exact statement right here, if you could get rid of it, will save you X% of the total execution time.
and sort them by X.
If you really need to fix a performance problem, this is what you need, and you can easily get it yourself. See here:
How to optimize the performance of your program
Mike dunlavey
source share