Re: Cleaning up and speeding up string functions

From: ilmari(at)ilmari(dot)org (Dagfinn Ilmari Mannsåker )
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cleaning up and speeding up string functions
Date: 2019-07-22 13:32:45
Message-ID: d8j4l3eurcy.fsf@dalvik.ping.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> writes:

> On Thu, 4 Jul 2019 at 13:51, David Rowley <david(dot)rowley(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-07-22 13:33:55 Re: psql - add SHOW_ALL_RESULTS option
Previous Message Peter Eisentraut 2019-07-22 13:21:02 Re: initdb recommendations