[sldev] performance with LLPointer

Erik Anderson odysseus654 at gmail.com
Fri Jul 13 14:35:22 PDT 2007


On 7/13/07, Nicholaz Beresford <nicholaz at blueflash.cc> wrote:
>
>
> > It can, because of the need to constantly update refcounts.  That
> > imposes a small compute overhead and has something of a cache impact.
> > How measurable is hard to say, but I wouldn't want to be fiddling with
> > LLPointers in a place I knew was an inner loop.
>
> I'd approach this in the way like with the LLDrawInfo, that is changing
> vector/list members to LLPointer but leaving function calls off those
> members (or pointers inside functions) regular C++.


FWIW, This is the only way I ever figured out how to use the STL auto_ptr<>
classes without going half crazy.  Just make sure that the functions you
call don't do side effects like storing the pointers somewhere else or using
deferred processing or something weird that could affect lifetime.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20070713/7a8c1353/attachment.htm


More information about the SLDev mailing list