Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Tuesday 03 of April 2012, Enrico Weigelt wrote:
Hi,

 I don't want to spoil the fun much for you :) , but I expect the
 number of
string allocations to go down when RTL_CONSTASCII_* stops being used
in favor
of string literals, and further down after whenever I get to
implementing the
efficient operator+. So you may be profiling a problem for a part of
which a
solution already exists.

Just curious: what's the big difference between rtl::OUString and
std::string ?

 http://lists.freedesktop.org/archives/libreoffice/2012-March/028485.html (and 
click the next message link a couple of times).

I guess a good toolchain (compiler+stdlibs) can do a lot of optimizations,
which it cannot with an own implementation. For example, if we have lots
of static strings (literals, or statically initialized and const
std::string objects), it could put them all together into one instance in
const data section.

 I doubt any compiler we use treats std::string specially, I'd expect it's a 
normal class for it just like any other.

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.