Re: Cleaning up and speeding up string functions - Mailing list pgsql-hackers

From ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Subject Re: Cleaning up and speeding up string functions
Date
Msg-id d8j4l3eurcy.fsf@dalvik.ping.uio.no
Whole thread Raw
In response to Re: Cleaning up and speeding up string functions  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Cleaning up and speeding up string functions  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
List pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:

> On Thu, 4 Jul 2019 at 13:51, David Rowley <david.rowley@2ndquadrant.com> 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 couple more places where the
> length is known.

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) to avoid the
`str.data, str2.len` repetition?

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: initdb recommendations
Next
From: Fabien COELHO
Date:
Subject: Re: psql - add SHOW_ALL_RESULTS option