Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-01-26 04:48:06

Robert Ramey wrote:

> Vladimir Prus wrote:
>>If, you plan to use both, consider:
>> class B { public: virtual ~B() {} };
>> class D1 : public B {};
>> class D2 : public B {};
>> class D3 : public B {};
>>Suppose you're writing all those classes. Under current semantics, you'll
>>have strings "D1", "D2" and "D3" written to archive at some point, once.
>>With my proposal, "B" will also be written to archive, once. Is *that*
>>really important performance-wise?
> I don't believe that's true. I'm pretty sure that under your proposal
> (in your previous example) the archive would need to contain
> all the strings "D1", "D2", and "D3"

Yes, that's why I wrote

   will *also* be written

The D1, D2 and D3 strings are written to archive already, with current
implementation. We're talking about performance aspects of writing
additional "B".

> I think a better answer would be that if efficiency were of such
> prime importance forward registration using ar.template register
> would be used as it requires no strings at all. this "forward
> registration" relies on syncronization of save and load
> to match the class invoked durring save to a the class
> to be invoked during load.

Yes, that's why I've asked Lo?c whether he's going to use BOOST_CLASS_EXPORT
at all.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at