Re: Efficient string concatenation

2012-12-03 Thread Lubos Lunak
On Monday 03 of December 2012, Caolán McNamara wrote: > On Sun, 2012-12-02 at 22:59 -0600, Norbert Thiebaud wrote: > > vaguely related... since we are talking about performance... why > > *_new_WithLength() in strtmpl.cxx is doing a memset on the whole newly > > allocated buffer... > > yeah, someon

Re: Efficient string concatenation

2012-12-03 Thread Caolán McNamara
On Sun, 2012-12-02 at 22:59 -0600, Norbert Thiebaud wrote: > vaguely related... since we are talking about performance... why > *_new_WithLength() in strtmpl.cxx is doing a memset on the whole newly > allocated buffer... yeah, someone noticed that when writing i18npool/i18nutil and wrote a non-mem

Re: Efficient string concatenation

2012-12-03 Thread Stephan Bergmann
On 12/02/2012 11:56 PM, Lubos Lunak wrote: From 9b6e150c83c43c51dbdc6a5075d110fcc6e25210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 2 Dec 2012 22:33:47 +0100 Subject: [PATCH 4/5] make sure uno::Any works with fast operator+ The result of the operation need

Re: Efficient string concatenation

2012-12-03 Thread Lubos Lunak
> > On Sun, Dec 2, 2012 at 4:56 PM, Lubos Lunak wrote: > >> The work is based on threads [1] and [2] and occassionally seeing in > >> the commits that people doing string cleanups sometimes change ugly code > >> to only slightly less ugly code. With the new feature enabled, any > >> string concat

Re: Efficient string concatenation

2012-12-02 Thread Norbert Thiebaud
On Sun, Dec 2, 2012 at 10:59 PM, Norbert Thiebaud wrote: > vaguely related... since we are talking about performance... why > *_new_WithLength() in strtmpl.cxx is doing a memset on the whole newly > allocated buffer... > surely the allocated buffer will be filled with something soon > enough... al

Re: Efficient string concatenation

2012-12-02 Thread Norbert Thiebaud
Patch 0001 it seems to me that addData via the different addDataHelper, do _not_ add the final binary 0, like rtl_stringbuffer_insert() for instance is doing so: +#ifdef RTL_FAST_STRING +template< typename T1, typename T2 > +OStringBuffer( const OStringConcat< T1, T2 >& c ) +{ +

Re: Efficient string concatenation

2012-12-02 Thread Norbert Thiebaud
On Sun, Dec 2, 2012 at 4:56 PM, Lubos Lunak wrote: > in pathc 0001: +#ifdef RTL_FAST_STRING +template< typename T1, typename T2 > +OStringBuffer( const OStringConcat< T1, T2 >& c ) +{ +const int l = c.length(); +rtl_String* buffer = NULL; +rtl_string_new_WithL

Re: Efficient string concatenation

2012-12-02 Thread Norbert Thiebaud
On Sun, Dec 2, 2012 at 6:55 PM, Norbert Thiebaud wrote: Sorry fro previous post. mishap... > On Sun, Dec 2, 2012 at 4:56 PM, Lubos Lunak wrote: >> >> Hello, >> >> The work is based on threads [1] and [2] and occassionally seeing in the >> commits that people doing string cleanups sometimes ch

Re: Efficient string concatenation

2012-12-02 Thread Norbert Thiebaud
On Sun, Dec 2, 2012 at 4:56 PM, Lubos Lunak wrote: > > Hello, > > The work is based on threads [1] and [2] and occassionally seeing in the > commits that people doing string cleanups sometimes change ugly code to only > slightly less ugly code. With the new feature enabled, any string > concaten