| From: | Nathan Bossart <nathan(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Speedup COPY FROM with additional function inlining. |
| Date: | 2026-02-20 18:08:20 |
| Message-ID: | E1vtUvM-000LcW-2T@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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 <byavuz81(at)gmail(dot)com>
Reviewed-by: Ayoub Kazar <ma_kazar(at)esi(dot)dz>
Tested-by: Manni Wood <manni(dot)wood(at)enterprisedb(dot)com>
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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-02-20 20:31:27 | pgsql: First-draft release notes for 18.3. |
| Previous Message | Heikki Linnakangas | 2026-02-20 09:57:51 | pgsql: Fix expanding 'bounds' in pg_trgm's calc_word_similarity() funct |