Boost logo

Boost :

From: Sid Sacek (ssacek_at_[hidden])
Date: 2008-06-06 20:49:49

boost::shared_ptr<> uses a locking mechanism when copies of a variable are made in order to increment the counter correctly in a
multi-threaded application.

For example:

int main( int, char ** )
        boost::shared_ptr< ABC > sp1( new ABC );

        for ( int i = 0; i < 1000000; ++i )
                boost::shared_ptr< ABC > sp2 = sp1;
        return 0;

I would like to know if there are any platform-specific timing tests that have been performed where operational speed results have
been recorded. I want to know what kind of performance I should expect to achieve on different operating systems upon duplication
and destruction of shared pointers.

-Sid Sacek

Boost list run by bdawes at, gregod at, cpdaniel at, john at