Hi, To those writing benchmarks, please note that the standard library provides std::make_shared() as an optimization for shared_ptr. It creates the object and its shared storage in a single allocation, instead of the two allocations required for "std::shared_ptr<Foo> fs (new Foo())".
Casey ----- Original Message ----- > 1- I agree we should avoid shared_ptr whenever possible. > > 2- unique_ptr should not have any more overhead than a raw pointer--the > compiler is enforcing the single-owner semantics. See for example > > https://msdn.microsoft.com/en-us/library/hh279676.aspx > > "It is exactly is efficient as a raw pointer and can be used in STL > containers." > > Unless the implementation is broken somehow? That seems unlikely... > > sage > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html