Re: Improve a few appendStringInfo calls new to v18 - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Improve a few appendStringInfo calls new to v18
Date
Msg-id Z_fbCR8_BL6FwXWw@nathan
Whole thread Raw
In response to Re: Improve a few appendStringInfo calls new to v18  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Improve a few appendStringInfo calls new to v18
List pgsql-hackers
On Thu, Apr 10, 2025 at 11:24:36AM +0300, Heikki Linnakangas wrote:
> On 10/04/2025 06:51, David Rowley wrote:
>> Any objections to doing this soonish? Or in a few weeks?
> 
> Sure, let's do it. Why would we wait?

+1.  You did something similar for v17 (commit 8461424), and it seems like
an entirely reasonable post-feature-freeze routine to me.

This probably isn't v18 material, but this reminds me of my idea to change
appendStringInfoString() into a macro for appendBinaryStringInfo() so that
the compiler can remove the runtime strlen() calls for string literals [0].
In most cases, the benefits are probably negligible, but StringInfo is
sometimes used in hot paths.

[0] https://postgr.es/m/20231218164135.GA530790%40nathanxps13

-- 
nathan



pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Correct documentation for protocol version
Next
From: Nathan Bossart
Date:
Subject: Re: Add os_page_num to pg_buffercache