This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: COW strings in libstdc++


Forgot to replay to all originally...


---------- Forwarded message ----------
From: Brendan Miller <catphive@catphive.net>
Date: Mon, Aug 31, 2009 at 2:42 PM
Subject: Re: COW strings in libstdc++
To: Paolo Carlini <paolo.carlini@oracle.com>


On Mon, Aug 31, 2009 at 10:52 AM, Paolo Carlini<paolo.carlini@oracle.com> wrote:
> Brendan Miller wrote:
>> It looks like the current implementation of string in libstdc++ is
>> copy on write correct? Is this also true of gcc 3.4?
> It is certainly true, and the fact that we didn't break the ABI since
> confirms that.
>> ?Is this behavior
>> guaranteed for the future, or will C++0x somehow require a change
>> here?
>>
> It will require a change, since COW strings will be forbidden.
>
> Paolo.
>

That's interesting. Are there any links to information on the
rationale for this? This is actually in the new standard?

Is this just due to threading performance issues? Or the desire to
make performance a little more predictable when writing to the string?

It would be good to have a discussion about this in manual, which is
pretty thin right now... I only found out that strings were COW at all
by looking at the source.

Brendan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]