Re: Optimizing using grof, interpreting flat profile?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It doesn't look like a vector<vector<int> > to me.  Just a vector<int>.
But it does look like a lot of time spent in that copy constructor.
I usually find non flat profiling (to find out what called the problem code) is more trouble than it's worth. In this situation (been there many times). I tend to just set a breakpoint on the function which I don't think should have been used so much and look at the stack each time it gets hit. If there are lots of legitimate calls, that approach fails. But my guess is most of the calls you have to that copy constructor are the ones you didn't intend, so a breakpoint will solve the problem quickly.


John (Eljay) Love-Jensen wrote:
I am having a little trouble understanding this line.

It indicates that the copy-constructor for your vector<vector<int>> is
consuming 14.33% of the run time.

That's a lot.  Especially if you've taken care not to copy your
vector-of-vectors-of-ints.  It appears that you missed a case.

Sincerely,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux