$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-01-31 06:34:21
David Maisonave wrote:
> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:<8764o1azuq.fsf_at_[hidden]>...
>> Not if you're compiling without mt support on; the thread safety
>> features of shared_ptr just compile away (and I think there's a macro
>> you can use to force them off). Let's compare apples to apples: your
>> reflinked implementation will be slower in a MT environment. I'm not
>> yet convinced it will be faster in a ST environment unless you leave
>> the MT features of shared_ptr turned on.
>
> Currently, my test results don't support your above comment.
> Please provide the this macro you're referring to.
> Without this macro, there's no way of testing your claim.
The macro is BOOST_SP_DISABLE_THREADS, but if you're timing only
construction, it probably won't matter much. A reference-linked
implementation will obviously outperform a reference-counted implementation
for simple construction because it doesn't need to allocate a count.