Subject: Re: [boost] [shifted_ptr] Review Request
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-04-06 14:07:07
On 04/06/2011 10:54 AM, Nevin Liber wrote:
> 2011/4/6 Ð®ÑÑÐ¹ ÐÑÐ±ÑÐ¸ÑÑÐºÐ¸Ð¹<mt.wizard_at_[hidden]>
>> Actually, boost::make_shared involves one dynamic_cast operation (when
>> getting deleter from shared_ptr object), that's why it doesn't perform
>> faster at all
> Where exactly is that in the code? I don't see it in make_shared.hpp
> (1.46.1), and the uses inside shared_ptr.hpp look to be related to
> construction and dynamic_pointer_cast.
I assume that he's referring to the call to get_deleter.
It doesn't actually do a dynamic_cast. It
does a single type_info comparison.
> I also surmise that dynamic_cast is still faster than heap allocation.