Re: Cleaning up and speeding up string functions

2019-07-22 Thread Dagfinn Ilmari Mannsåker
Alvaro Herrera writes: > On 2019-Jul-22, Dagfinn Ilmari Mannsåker wrote: > >> ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: >> >> > I noticed a lot of these are appending one StringInfo onto another; >> > would it make sense to introduce a helper funciton >> >

Re: Cleaning up and speeding up string functions

2019-07-22 Thread Alvaro Herrera
On 2019-Jul-22, Dagfinn Ilmari Mannsåker wrote: > ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > > > I noticed a lot of these are appending one StringInfo onto another; > > would it make sense to introduce a helper funciton > > appendStringInfoStringInfo(StringInfo str, StringInfo str2)

Re: Cleaning up and speeding up string functions

2019-07-22 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > David Rowley writes: > >> On Thu, 4 Jul 2019 at 13:51, David Rowley >> wrote: >>> Instead of having 0004, how about the attached? >>> >>> Most of the calls won't improve much performance-wise since they're so >>> cheap anyway, but there is

Re: Cleaning up and speeding up string functions

2019-07-22 Thread Dagfinn Ilmari Mannsåker
David Rowley writes: > On Thu, 4 Jul 2019 at 13:51, David Rowley > wrote: >> Instead of having 0004, how about the attached? >> >> Most of the calls won't improve much performance-wise since they're so >> cheap anyway, but there is xmlconcat(), I imagine that should see some >> speedup. > >

Re: Cleaning up and speeding up string functions

2019-07-22 Thread David Rowley
On Thu, 4 Jul 2019 at 13:51, David Rowley wrote: > Instead of having 0004, how about the attached? > > Most of the calls won't improve much performance-wise since they're so > cheap anyway, but there is xmlconcat(), I imagine that should see some > speedup. I've pushed this after having found a

Re: Cleaning up and speeding up string functions

2019-07-03 Thread David Rowley
On Sun, 26 May 2019 at 04:50, Tom Lane wrote: > > David Rowley writes: > > Here's a small patch series aimed to both clean up a few misuses of > > string functions and also to optimise a few things along the way. > > > 0001: Converts various call that use appendPQExpBuffer() that really > >

Re: Cleaning up and speeding up string functions

2019-06-12 Thread David Rowley
On Thu, 6 Jun 2019 at 08:54, Alvaro Herrera wrote: > > On 2019-May-26, David Rowley wrote: > > > On Sun, 26 May 2019 at 04:50, Tom Lane wrote: > > > > Here the cost is code space rather than programmer-visible complexity, > > > but I still doubt that it's worth it. > > > > I see on today's

Re: Cleaning up and speeding up string functions

2019-06-05 Thread Alvaro Herrera
On 2019-May-26, David Rowley wrote: > On Sun, 26 May 2019 at 04:50, Tom Lane wrote: > > Here the cost is code space rather than programmer-visible complexity, > > but I still doubt that it's worth it. > > I see on today's master the postgres binary did grow from 8633960 > bytes to 8642504 on

Re: Cleaning up and speeding up string functions

2019-05-25 Thread David Rowley
On Sun, 26 May 2019 at 04:50, Tom Lane wrote: > > David Rowley writes: > > 0003: Adds a new function named appendStringInfoStringInfo() which > > appends one StringInfo onto another. Various places did this using > > appendStringInfoString(), but that required a needless strlen() call. > > I

Re: Cleaning up and speeding up string functions

2019-05-25 Thread Tom Lane
David Rowley writes: > Here's a small patch series aimed to both clean up a few misuses of > string functions and also to optimise a few things along the way. > 0001: Converts various call that use appendPQExpBuffer() that really > should use appendPQExrBufferStr(). If there's no formatting

Cleaning up and speeding up string functions

2019-05-25 Thread David Rowley
Here's a small patch series aimed to both clean up a few misuses of string functions and also to optimise a few things along the way. 0001: Converts various call that use appendPQExpBuffer() that really should use appendPQExrBufferStr(). If there's no formatting then using the former function is