Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2002-07-31 08:37:19


> > [...]
> > Ok. It's a good point and I agree. But:
> > - Allocation with operator new (size_t, xmm const &) will still be
faster
> > than:
> > - an extra allocation for a counter;
> > - amortized allocations in pool (maybe this is a negligible fact but
> > still is a fact :).
>
> It's like ripping the seats out of a Ferrari to get an extra 0.2 mph.
Sure,
> it makes it faster, but do you really want to drive it? ;)

Yeah luckily:
- that virtual destructors return the address of the real type;
- sizeof() is not virtual;
- typeid() is nearly useless... except for compiler developers of course;
- ((char *) (Y *) (Derived *) 1 - (char *) 1) is not a compile-time
constant;

It is not in my own interests to have sizeof(ptr<int>) greater than
sizeof(int *) even if the speed would be faster than shared_ptr<int> with
operator new (size_t, xmm &) allocations, so I'll go back to my
mutable_ptr<int> where sorts are not necessary... like with configuration
files...

I was great talking to you people. I learned much and I hope it is
reciprocal for the reinforcement of your arguments.

Thank you,

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