|
Boost : |
Subject: Re: [boost] [xint] Boost.XInt formal review
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-03-03 11:36:40
On 03/03/2011 15:58, Chad Nelson wrote:
> On Wed, 2 Mar 2011 15:59:32 -0600
> "Terry Golubiewski"<tjgolubi_at_[hidden]> wrote:
>
>> On second thought, I don't think copy-on-write is desirable.
>> Move semantics and references/pointers/smart-pointers give me all the
>> capability and control I want while simplifying the implementation (I
>> suppose).
>
> <http://lists.boost.org/Archives/boost/2010/05/166036.php>
This never made much sense.
Of course it is faster to alias a memory block and update a counter than
to copy said memory black.
I don't see how you can draw any kind of conclusion from those tests. If
you want it to make sense, test the efficiency of moves, not of copies.
But then your library copies everywhere, so you'll have to change that
first (easiest way to tell you're not copying is to make your type
movable only).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk