public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: [email protected]
Subject: pgsql: Speedup COPY FROM with additional function inlining.
Date: Fri, 20 Feb 2026 18:08:20 +0000
Message-ID: <[email protected]> (raw)

Speedup COPY FROM with additional function inlining.

Following the example set by commit 58a359e585, we can squeeze out
a little more performance from COPY FROM (FORMAT {text,csv}) by
inlining CopyReadLineText() and passing the is_csv parameter as a
constant.  This allows the compiler to emit specialized code with
fewer branches.

This is preparatory work for a proposed follow-up commit that would
further optimize this code with SIMD instructions.

Author: Nazir Bilal Yavuz <[email protected]>
Reviewed-by: Ayoub Kazar <[email protected]>
Tested-by: Manni Wood <[email protected]>
Discussion: https://postgr.es/m/CAOzEurSW8cNr6TPKsjrstnPfhf4QyQqB4tnPXGGe8N4e_v7Jig%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dc592a41557b072178f1798700bf9c69cd8e4235

Modified Files
--------------
src/backend/commands/copyfromparse.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Speedup COPY FROM with additional function inlining.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox