Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2003-01-29 23:32:08


"David B. Held" <dheld_at_[hidden]> wrote in message
news:b19io8$o05$1_at_main.gmane.org...

[...]

> Looks like your lead is getting eroded by the day. ;) And that's just
> with a quick hack. You better be worried about a serious small
> object allocator. Not only that, but the items that seem most important
> to me are copy, sort, and swap, since those are the most frequent or
> computationally intensive. And in those three categories, you have
> virtually no advantage. In fact, shared_ptr beats shifted_ptr in copy???
> What happened? The sort speed amounts to < 1% difference. Even
> swap amounts to about a 5% diff. This is very telling. The biggest
> speed difference is during construction, and that is where shared_ptr
> is least optimized.

Let's not forget constructions and destructions are optimized by the
compiler when used consecutively. Reconstruction is a more concrete
example. Thus I can play with construction and destruction as well. Swaps
and copies should logically be similar since only the count is incremented,
the memory blocks are not affected.

Don't we forget also that every time I run the benchmark, the results are
always different (I should use nice --20 as root) and there is some margin
of error +/-1 second.

Philippe A. Bouchard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk