Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2002-10-08 00:50:06


"Dave Harris" <brangdon_at_[hidden]> wrote:
> In-Reply-To: <008c01c26e24$28c0d7c0$1d00a8c0_at_pdimov2>
> On Mon, 7 Oct 2002 20:08:29 +0300 Peter Dimov (pdimov_at_[hidden]) 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
> > the time goes down to 1 second.
> >
> > Is this a significant speedup, in your opinion?
>
> Generally I don't get out of bed for less than a factor of 2. I'd probably
> make an exception for a library routine which will be used intensively by
> a large number of other people. Unless the optimisation was ugly, I might
> go as low as 5-10%.

(
    BTW contructing
    placed_ptr<int> px(new (po) int);

    is
    0.0010055000 / 0.0002576000 = 3.9033385093167 ~= 390 %

    faster.

    Reconstruction:
    28.0493279000 / 5.1646666647 = 5.4310045005836 ~= 543 %

    Still there is place for deallocation optimizations.
)

[...]

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