Boost logo

Boost :

From: Greg Colvin (Gregory.Colvin_at_[hidden])
Date: 2002-08-29 22:14:37

At 07:45 PM 8/29/2002, you wrote:
>Greg Colvin wrote:
>> The compiler on my machine emits a function call for dynamic_cast to
>> void*, plus whatever that function does, which seems a lot of overhead
>> compared to the two masks and two memory references than an implemention
>> based on size- segregated allocation would require.
>> Perhaps the compilers you have tested do a better job?
>Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
>gcc version 2.95.4 20011006 (Debian prerelease)
>Compiled with: 'g++ -O2 -lrt' under Intel 1.4 GHz.

I found 2.91.57 on my machine, and it also avoids the function call.
I'd like to see results from some more compilers, but it appears
likely that dynamic_cast is good enough.

>>> (placed_ptr*);
>>>There is no reason to debate this anymore (it's like saying F != ma).
>> Well, it isn't, as was known nearly a century ago, but it's close enough.
>If placed_ptr<> is not approaching light speed, it'll be ok.


Now, I still want to see these ideas applied to boost::shared_ptr.

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