string / size bits ... #2 ...

Lubos Lunak l.lunak at
Tue Apr 3 00:52:57 PDT 2012

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 ? (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 at

More information about the LibreOffice mailing list