Re: Proposal: add new API to stringinfo

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: nathandbossart(at)gmail(dot)com
Cc: dgrowleyml(at)gmail(dot)com, gurjeet(at)singh(dot)im, pgsql-hackers(at)postgresql(dot)org, michael(at)paquier(dot)xyz, andrew(at)dunslane(dot)net
Subject: Re: Proposal: add new API to stringinfo
Date: 2025-01-09 06:21:41
Message-ID: 20250109.152141.1002812055467805480.ishii@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> If it's not too much work to coax the compiler to do so, then I don't see a
> strong reason to avoid it. Granted, there are probably much more expensive
> parts of the StringInfo support functions (e.g., palloc()), but these are
> hot enough code paths that IMHO it's worth saving whatever cycles we can.

Ok, I have created v3 patch to do more inlining as you suggested. With
the patch I confirmed that there's no call to functions except palloc
in makeStringInfo, makeStringInfoExt, initStringInfo and
initStringInfoExt in the asm codes (see attached stringinfo.s).

Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

Attachment Content-Type Size
v3-0001-Add-new-StringInfo-APIs-to-allow-callers-to-speci.patch application/octet-stream 5.9 KB
unknown_filename text/plain 13.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2025-01-09 06:45:52 Re: Fix bank selection logic in SLRU
Previous Message Pavel Stehule 2025-01-09 05:57:11 Re: Re: proposal: schema variables