From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-07-22 11:50:00
David Abrahams wrote:
> From: "Vladimir Prus" <ghost_at_[hidden]>
> > Say you call x which call x which calls x. I'll refer to function
> instances as
> > x1, x2 and x3 ;
> > Cumulative time for x will include
> > net time for x3 +
> > net time for x2 + total time for x3 +
> > net time for x1 + total time for x2
> > and this is equal to
> > net time for x1 + 2 * net time for x2 + 3 * net time for x3.
> > You're counting the same time several times!
> Hmm, no wonder recursive calls appeared to be so expensive!
Well... that's why my previous message used calls to 'hashitem' to compare
> It seems like a simple fix is possible - put an entry count on profile_info
> and only accumulate cumulative time when it goes to zero.
Yea, guess that will work. Comitted the change -- oh... now the profiling
information looks much more reasonable -- as expected, class.__init__ is
responsible for the largest fraction of classes overhead.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk