From: Maxim Yegorushkin (e-maxim_at_[hidden])
Date: 2004-09-26 12:45:45
Igor Kholodov <C.JUMP_at_[hidden]> wrote:
>> Igor Kholodov <C.JUMP_at_[hidden]> wrote:
>>> I am testing immutable string outside boost, using
>>> as string type with common text transformation
>>> (http://cttl.sourceforge.net/). It works quite well,
>>> about 18% speed is gained while parsing large XML
>>> documents (>1MB) when using const_string.
>> Could you please specify the compiler and STL
> implementation you use?
> Tested with GCC 3.4.1 (mingw) and GCC 3.2.3 on linux.
Then, I think, the results are very good because GNU ISO
C++ implementation of std::basic_string<> uses representation sharing with
reference counting, which is the same thing that const_string<> does. The
only difference between the std::basic_string<> and const_string<> is that
the latter one uses small string optimization, and, I think, this is what
makes it look better.
-- Maxim Yegorushkin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk