
Igor Kholodov <C.JUMP@prodigy.net> wrote:
I am testing immutable string outside boost, using it as string type with common text transformation library (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. Igor Kholodov cttl@users.sourceforge.net http://cttl.sourceforge.net/ Igor Kholodov http://cttl.sourceforge.net/

Igor Kholodov <C.JUMP@prodigy.net> wrote:
Igor Kholodov <C.JUMP@prodigy.net> wrote:
I am testing immutable string outside boost, using it as string type with common text transformation library (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
participants (2)
-
Igor Kholodov
-
Maxim Yegorushkin