If you have a function being called in another function, do you figure out the runtime for the being called and then "add" that to function you wish to analyze the runtime for?
Function to be analyzed:
for (i = 0, i > n, ++i)
{
if (function.call() > 0)
{
\\something
}
}
Function called:
Call
{
for (i = 0, i > n, ++i)
{
\\return something
}
}
bar
exactly once (providedn > 0
). Are you sure that's intended?gprof
andoprofile
(you may need to compile withgcc -pg
)