From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-10-07 13:01:25
From: "Gennaro Prota" <gennaro_prota_at_[hidden]>
> On 07 Oct 2002 13:23:59 -0400, Jeff Paquette <flyfishr64_at_[hidden]>
> >On Mon, 2002-10-07 at 13:08, Peter Dimov wrote:
> >> Let's assume for the sake of discussion ;-) that you can do one million
> >> shared_ptr allocations for 1.3 seconds. You turn on optimization X and
> >> time goes down to 1 second.
> >> Is this a significant speedup, in your opinion?
> >In my opinion, a 30% performance improvement is always nice
> >to achieve, especially if it is a common operation.
> Well, I don't know how to take Peter's post. Since I know he's very
> sharp (and expert), whereas the question is a little vague...
> Peter? Is this an honest question? Or are you luring us into a trap?
Not a trap. The numbers are real. You can do
shared_ptr<int> px(new int);
in under a microsecond on an Athlon/1.4. On some platforms, using
std::allocator instead of plain new results in a 30% speedup, but what real
program would need to allocate that many shared_ptrs per second? :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk