From 6018921314107016959
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,25827c9ceb81badc,start
X-Google-Attributes: gidf78e5,public
From: Valentin Bonnard <bonnardv@pratique.fr>
Subject: Re: string/cow/algorithm
Date: 1998/08/18
Message-ID: <35D9AE1C.7553@pratique.fr>#1/1
X-Deja-AN: 382338141
X-NNTP-Posting-Host: cyber80-2.paris.imaginet.fr
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
X-UID: 0000000001
X-Status: $$$T
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@pratique.fr
X-Trace: aristote.pratique.fr 903457909 27252 195.68.2.80 (18 Aug 1998 16:31:49 GMT)
Organization: Ecole Normale Superieure, Paris, France
Mime-Version: 1.0
Reply-To: bonnardv@pratique.fr
NNTP-Posting-Date: 18 Aug 1998 16:31:49 GMT
Newsgroups: comp.std.c++
Originator: clamage@taumet


Nathan Myers <ncm@nospam.cantrip.org> writes:

> the reference-counted version is 
> *always* more efficient than the always-copying version.

A text manipulation program written in pre-STL style 
using only operator[] would be significantly slower 
except if the optimiser is clever enough to understand 
that the string is always locked.

Both cow and non cow strings make sens.

-- 

Valentin Bonnard                mailto:bonnardv@pratique.fr
info about C++/a propos du C++: http://pages.pratique.fr/~bonnardv/


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




