Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: DE (satan66613_at_[hidden])
Date: 2010-05-02 12:42:38


on 02.05.2010 at 20:05
 vicente.botet wrote :

> On the documentation you say " Some of these numbers can get huge,
> making copying an expensive proposition, and even move semantics (at
> least as emulated by Boost.Move at the time of this writing) aren't as fast"

> Why do you say on Boost.Move is not as fast as COW?

can i reply? please can i? can i?

for example if you make 10 copies of an object

cow (or implict sharing) aware objects will share only one
representation among all instances, i.e. there is only one allocation,
initialization and no copy processes at all

in this circumstances move enabled objects would not act as efficient
supposing none of that ten copies are temporary you get ten "deep"
copies of the first object
this involves ten allocations, initializations and costs associated
with them

so in some circumstances implicit sharing (or cow) will always be
faster even if move semantics is implemented otherwise

-- 
Pavel
P.S.
if you notice a grammar mistake or weird phrasing in my message
please point it out

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