Boost logo

Boost :

Subject: Re: [boost] [submission] STL-compliant containers with copy-on-write
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-03-31 13:54:14


On Thu, Mar 31, 2011 at 8:00 AM, Alexandr Sterligov
<sterligov.ak_at_[hidden]>wrote:

> I'm working with embedded software and we have to use COW containers pretty
> often.

[...]

Can you describe a typical or example use case, from your experience, where
COW is necessary?

My own perspective: I've generally thought that, for typical container
usage, COW is unnecessary, in the sense that it gives no performance benefit
(and, if anything, a performance hit) given disciplined coding practices;
COW is complicated to implement correctly and constrains your design; and,
simply put, COW is a pessimism. It might be useful in exceptional
circumstances, but certainly, I would think, far less frequently than
"pretty often". But I'm open and curious to hear others' experiences.

- Jeff


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