Hi Dean,

On Wed, Oct 20, 2010 at 14:39, Dean Michael Berris
<[email protected]> wrote:
>>
>>
>> I'm unconvinced that COW strings can be depended on as a central
>> library feature- a quick Google seems to indicate otherwise.
>>
>> http://bit.ly/hiqqU
>> http://bit.ly/cqpKVN
>>
>
> cpp-netlib doesn't depend on COW, but most implementations do
> implement std::string with COW optimizations. This means, GNU's
> libstdc++ has a COW string, Dinkumware (now Microsoft's STL)
> implements it as well. Worrying about copies only matters if it's
> really affecting the performance of the application.

Microsoft's STL as of VS2008 doesn't use COW, it uses the small-string
optimization. Not sure if they went (back?) to COW in 2010, but I
doubt it.

LLVM has an interesting sub-project implementing a standard library
from scratch, and one of the decisions they mention in the overview is
using small string optimization over COW, as if it was a plain truth;
http://libcxx.llvm.org/.

So, I think there's merit to not expecting COW from std::string.

- Kim

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Cpp-netlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel

Reply via email to