[sldev] 25% of processing time in particle operator= ???

Mark Wagner carnildo at gmail.com
Wed Mar 21 13:03:51 PDT 2007


On 3/21/07, Tateru Nino <tateru.nino at gmail.com> wrote:
> This is so, but the relative percentages of time consumed, should remain
> the same.
>
> Something that takes 25% of your time should still take about 25%
> whether you're running release binary or a debug build. (In fact,
> profiling really only ever works on debug builds). The absolute times
> change (they all get 2-3 times larger) but the relative consumptions
> stay the same.

Only under some circumstances.  For example, a 100-iteration
calculation loop with a large constant subexpression would be almost
100 times faster under release than under debug.  In the case you're
referring to, LLPointer<LLViewerPart>::operator=(LLPointer<LLViewerPart>
const&) is a smart-pointer assignment operator.  In the release build,
this function won't even exist: it'll be converted into two inline
statements: an assignment and an increment.  Without the function-call
overhead, it'll run about 50-75 times faster.

-- 
Mark
aka Carnildo Greenacre


More information about the SLDev mailing list