Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2000-01-31 14:37:39


From: "Greg Colvin" <gcolvin_at_[hidden]>
>
> The intrusive approach is almost sure to have the best performance,
> but the results so far show the non-intrusive approaches to be close
> enough for most purposes.
>
> > Linked pointer seemed like a silver bullet, because it bypassed the
> > memory manager, and still did not have big overheads, but now I see its
> > drawbacks too. It is important to keep this conversation going just so
> > as many facts and theories about the different implementations are
> > discovered.

To keep things realistic, the discussion needs to account for large programs
with scattered usage of multiple smart pointers. The smart pointer tests
run so far are all small kernels, where the code probably fits easily into a
low-level cache, so the code space used by the various implementations
doesn't affect the running time. In a real program, however, I suspect this
is not the case.

Implementations that use a lot of code space will bump other code out of the
cache; likewise, implementations that make a lot of decisions will bump
other code's decisions out of the branch prediction table.

Based on size indications mentioned in previous messages, this will
apparently add favor to the current shared_ptr. over the linked list
approaches, and also add favor to the circular linked list version over the
check-for-null version.

Does anyone have a larger program that uses a lot of smart pointers that
would qualify as a good test platform? I'm afraid that I don't have
anything to offer in this area myself. I just don't want to see too much
emphasis on "How fast can be make smart pointers go?" in lieu of "How fast
will this program that uses smart pointers be?"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk