Re: [boost] Proposal to add smart_ptr to the boost library

"Peter Dimov" <pdimov@mmltd.net> wrote in message news:<02e501c625d4$0804e1f0$6507a8c0@pdimov2>...
David Maisonave wrote:
On my test, reference-link is over 25% faster than reference-count logic for initialization.
This only matters if the only thing you do is initialize. This is best-case scenario for reference-linked for both performance and memory use. How often is that the case in real code?
Then there are thread safety, custom deleters, weak_ptr support, enable_shared_from_this, and competition from intrusive_ptr on the low end, which should be even faster in ST mode.
One of the main points of doing reference logic, is to increase performance during initialization. So this is a key test when testing reference logic performance. The test showed a big difference in initialization and in copying containers of smart pointers. There was very little difference when iterating through the container, but a big difference when copying the container of smart pointers. The smart_ptr supports thread safety, custom deleters, and intrusive_ptr. I'm not sure how important weak_ptr's are, and I have not seen a good case for their requirement. I'm open minded, and I would like to see someone put a good argument for their required usage. What is ST mode? And what exactly is enable_shared_from_this?
participants (1)
-
David Maisonave