Christopher Smith on 2 Jul 2003 17:14:01 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [ALACPP] smart pointers in C


On Wed, 2003-07-02 at 10:07, arlo@xxxxxxxxx wrote:
> I haven't had a chance to run a speed trial against shared_ptrs. The GC will
> be slower on average and have much worse worst-case behavior (when an alloc
> triggers a collect), but I don't know how much. This gc does work with a
> parallel gc approach (separate thread for performing collections), which could
> help with the worst-case behavior. However, I don't know how much.

Hmm... mark-sweep collectors, provided you have a good allocator, should
be able to outperform ref-counting smart pointers, particularly in a
multi-threaded environment. I haven't looked at this particular GC, but
I know of others which handedly kick smart pointers all over the place,
at least for the common case.

--Chris
_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp