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