
----- Original Message ----- From: "DE" <satan66613@yandex.ru> To: "vicente.botet" <boost@lists.boost.org> Sent: Sunday, May 02, 2010 6:42 PM Subject: Re: [boost] [xint] Third release is ready,requesting preliminary review
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?
YES, YOU CAN :)
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
Oh, I see. I was thinking on returning integer types from functions. Best, Vicente