Speedup COPY FROM with additional function inlining.
Nathan Bossart <nathan@postgresql.org>
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@gmail.com>
Reviewed-by: Ayoub Kazar <ma_kazar@esi.dz>
Tested-by: Manni Wood <manni.wood@enterprisedb.com>
Discussion: https://postgr.es/m/CAOzEurSW8cNr6TPKsjrstnPfhf4QyQqB4tnPXGGe8N4e_v7Jig%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/copyfromparse.c | modified | +14 −4 |
Discussion
- Speed up COPY FROM text/CSV parsing using SIMD 162 messages · 2025-08-07 → 2026-03-13