Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
return std::move( pRes )
std, make_shared: const of one iteration: 79.6456 ns.
boost, make_shared: const of one iteration: 154.441 ns.
std, make_shared + cast: const of one iteration: 96.3465 ns.
std, make_shared + fast cast: const of one iteration: 88.3443 ns.
boost, make_shared + cast: const of one iteration: 170.912 ns.
std, allocate_shared: const of one iteration: 41.9773 ns.
boost, allocate_shared: const of one iteration: 106.236 ns.
std, allocate_shared + cast: const of one iteration: 51.8958 ns.
std, allocate_shared + fast cast: const of one iteration: 47.2173 ns.
boost, allocate_shared + cast: const of one iteration: 122.333 ns.
std, release: const of one iteration: 139.189 ns.
boost, release: const of one iteration: 136.266 ns.
std, release + cast: const of one iteration: 152.798 ns.
std, release + fast cast: const of one iteration: 147.057 ns.
boost, release + cast: const of one iteration: 154.359 ns.
std, make_shared: const of one iteration: 59.2896 ns.
boost, make_shared: const of one iteration: 111.826 ns.
std, make_shared + cast: const of one iteration: 75.6804 ns.
std, make_shared + fast cast: const of one iteration: 63.9302 ns.
boost, make_shared + cast: const of one iteration: 127.658 ns.
std, allocate_shared: const of one iteration: 52.4064 ns.
boost, allocate_shared: const of one iteration: 99.92 ns.
std, allocate_shared + cast: const of one iteration: 66.9683 ns.
std, allocate_shared + fast cast: const of one iteration: 62.9726 ns.
boost, allocate_shared + cast: const of one iteration: 114.167 ns.
std, release: const of one iteration: 101.677 ns.
boost, release: const of one iteration: 100.807 ns.
std, release + cast: const of one iteration: 117.108 ns.
std, release + fast cast: const of one iteration: 106.495 ns.
boost, release + cast: const of one iteration: 114.833 ns.
boost::shared_ptr<BaseClass> MakeSharedPtr()
{
boost::shared_ptr<BaseClass> ptr = boost::make_shared<DerivedClass>();
return ptr;
}
Производительность shared_ptr и C++11: почему я не верю библиотекам