Christopher Smith on 2 Jul 2003 18:32: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 11:18, arlo@xxxxxxxxx wrote: > The key thing here is that the non-intrusive boost shared pointer takes about > 1.3 times as long to alloc, and 8.5 times as long to copy. There is room for a > mark-and-sweep gc to do better on copy, but it will not likely touch those > init times (even amortized). Overall, I expect the type of use to determine > which is faster. We'll see, if I ever get a compiler set up. > > Honestly, I just want to get the gc pointer to about the same speed as the > shared_ptr. That one is fast enough for all the projects that I've ever worked > on. Ah! It seems like you are intending to still use the standard heap allocator. That will make it pretty hard for the mark/sweep allocator to win. Half the fun mark/sweep is having heap allocs that are almost as fast as stack allocs. --Chris _______________________________________________ alacpp mailing list alacpp@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/alacpp