Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-10-19 08:07:43


"Robert Ramey" <ramey_at_[hidden]> writes:

> David Abrahams wrote:
>> "Robert Ramey" <ramey_at_[hidden]> writes:
>>
>>>> Why should anyone still use the other version? To save the compile
>>>> time for 5 lines of code?
>>>
>>> LOL - believe me, someone will want to do it differently. I can't
>>> say how or why - but believe me it will happen. The adaptor
>>> approach lets everyone add their own thing and lets everyone else
>>> pick and choose which combination of things they want to add.
>>
>> IIUC, you currently have some default implmentation that's 10x slower
>> than the one Matthias is proposing. Is there any good reason that the
>> fast implementation shouldn't be the default?
>
> The current implemenation is universal. The fast ... archive will
> only make a difference on those collections whose storage is
> contiguous.

I don't care if the fast archive doesn't make things faster in some
cases as long as it always works. Does it fail to work for some
collections?

> Its not even clear to to me that std::vector is storage
> is guarenteed to be contiguouse.

It is.

  http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#69

> Its not clear that its even applicable to archives other than native
> binary
>
> Basically Mattias enhancement is an exploitation of a special cases.
> That's actually a very good idea. But that's not the same replace
> of the general solution with something more intricate and more
> fragil -

I can't parse that. "That's not the same replace of the general
solution...?"

> at no improvment in performance.

No improvement in performance? Huh?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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