| From: | Manni Wood <manni(dot)wood(at)enterprisedb(dot)com> |
|---|---|
| To: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
| Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, KAZAR Ayoub <ma_kazar(at)esi(dot)dz>, Neil Conway <neil(dot)conway(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Speed up COPY FROM text/CSV parsing using SIMD |
| Date: | 2026-02-19 04:02:25 |
| Message-ID: | CAKWEB6qY=mU62oAQFAVPCFWvwRuTPKBwxvM2aZ+J7p_9_MBmhQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Feb 18, 2026 at 3:54 PM Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
wrote:
> Hi,
>
> On Thu, 19 Feb 2026 at 00:26, Nathan Bossart <nathandbossart(at)gmail(dot)com>
> wrote:
> >
> > On Wed, Feb 18, 2026 at 04:38:07PM +0300, Nazir Bilal Yavuz wrote:
> > > By looking at these results having both is_csv and simd_enabled as an
> > > argument and sending them as constant boolean arguments help most.
> >
> > Thanks for doing these tests. ISTM we might as well get this initial
> > inlining stuff committed. Thoughts?
>
> nitpick:
>
> -static bool CopyReadLineText(CopyFromState cstate, bool is_csv);
> +static pg_attribute_always_inline bool CopyReadLineText(CopyFromState
> cstate,
> + bool is_csv);
>
> Do we want to move the new CopyReadLineText() declaration below to
> group it with the other functions marked pg_attribute_always_inline?
>
> Other than that, LGTM. I think it makes sense to separately commit this.
>
> --
> Regards,
> Nazir Bilal Yavuz
> Microsoft
>
Hello.
I took some time tonight to apply v8 to the latest master (759b03b2) on my
x86 tower and arm raspberry pi 5.
Here are the results, using both narrow columns and the wider columns we've
been using througout:
x86 master NARROW
TXT : 2587.642000 ms
CSV : 2621.759000 ms
TXT with 1/3 escapes: 2707.933500 ms
CSV with 1/3 quotes: 3254.896500 ms
x86 v8 NARROW
TXT : 2488.655250 ms 3.825365% improvement
CSV : 2628.818000 ms -0.269247% regression
TXT with 1/3 escapes: 2615.522000 ms 3.412621% improvement
CSV with 1/3 quotes: 3446.368000 ms -5.882568% regression
x86 master WIDE
TXT : 30583.229500 ms
CSV : 35054.533500 ms
TXT with 1/3 escapes: 32767.421500 ms
CSV with 1/3 quotes: 44214.163500 ms
x86 v8 WIDE
TXT : 26527.494250 ms 13.261305% improvement
CSV : 33364.443750 ms 4.821316% improvement
TXT with 1/3 escapes: 29320.648000 ms 10.518904% improvement
CSV with 1/3 quotes: 42334.074750 ms 4.252232% improvement
arm master NARROW
TXT : 1999.401000 ms
CSV : 2081.610750 ms
TXT with 1/3 escapes: 2053.230250 ms
CSV with 1/3 quotes: 2431.608750 ms
arm v8 NARROW
TXT : 1981.663750 ms 0.887128% improvement
CSV : 2023.892500 ms 2.772769% improvement
TXT with 1/3 escapes: 2004.215250 ms 2.387214% improvement
CSV with 1/3 quotes: 2616.872750 ms -7.618989% regression
arm master WIDE
TXT : 9120.731750 ms
CSV : 11114.478250 ms
TXT with 1/3 escapes: 10338.124500 ms
CSV with 1/3 quotes: 13404.430250 ms
arm v8 WIDE
TXT : 8430.090750 ms 7.572210% improvement
CSV : 10115.135500 ms 8.991360% improvement
TXT with 1/3 escapes: 9624.383500 ms 6.903970% improvement
CSV with 1/3 quotes: 12331.714000 ms 8.002699% improvement
--
-- Manni Wood EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shveta malik | 2026-02-19 04:05:03 | Re: [PATCH] Support automatic sequence replication |
| Previous Message | Michael Paquier | 2026-02-19 03:58:12 | Re: Flush some statistics within running transactions |