|
Boost : |
Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: DE (satan66613_at_[hidden])
Date: 2010-05-03 11:44:31
on 03.05.2010 at 15:39
Stewart, Robert wrote :
> Chad Nelson wrote:
>> If I read your example correctly, then that's about what I
>> was thinking
>> of: algorithms that have to start with a copy of one or more of the
>> passed-in parameters, but then need to modify it/them. The division
>> algorithm requires this, just as one example off the top of my head.
> If your algorithm requires a copy, then COW should make it slower
> because it will first manipulate the reference count and because you
> must query in each mutating operation whether to make a unique copy.
i believe that mutating operations are so expensive that the cow
overhead becomes negligible
and one can live with it unless he is very pedantic
and yes, i think that cow is pretty useful here
especially complemented by "rvalue&move awareness"
also one should take into account that implicit sharing (cow) can be
made thread safe with little effort from the author (just a couple of
atomic ops)
i.e. as soon as atomic lib becomes a part of boost cow implementation
of xint can be made thread safe by your (lib user) desire
i'm glad that everyone switched to the implementation because it means
there is nothing criminally wrong with the interface
said that, we can expect the implementation to become optimal in time
so the main work is done i guess
congratulations!
-- 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