Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2010-05-03 12:43:17


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/03/2010 11:44 AM, DE wrote:

>> 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

Generally, yes. Incrementing a number is probably the absolute simplest
mutating operation possible, so simple that even checking to see whether
the integer is unique or not could represent half of the work done. But
for any other operation, the copy-on-write overhead is essentially
unnoticeable.

> 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

It can even be thread-safe in its current incarnation, if the user
simply calls the _make_unique() function before letting an integer cross
thread boundaries. I wouldn't mind eliminating that requirement though.

> 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!

Thanks. :-)
- --
Chad Nelson
Oak Circle Software, Inc.
*
*
*
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkve/SUACgkQp9x9jeZ9/wRsfQCePTB1dXCbnLMhgwEsPZv/oy7D
DmkAn22eAa4YZ8TulDGYmfyWOiSqHxFN
=zegF
-----END PGP SIGNATURE-----


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