| 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-24 04:44:44 |
| Message-ID: | CAKWEB6qzsZEQ4Czo9QBFiMXqdXVJknHUJwg6wjRwNzLn4+Jw0g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Feb 23, 2026 at 3:10 AM Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
wrote:
> Hi,
>
> On Fri, 20 Feb 2026 at 21:15, Nathan Bossart <nathandbossart(at)gmail(dot)com>
> wrote:
> >
> > Yeah, the couple of small regressions seem close to (or below) the noise
> > level, and IIUC yours were the only benchmarks that showed them, anyway.
> > Plus, I think we'll need this change regardless as a prerequisite for the
> > SIMD work.
> >
> > > Thank you both for the benchmarks. Results look good to me!
> >
> > Committed that part.
>
> Thank you! Attaching the SIMD patch only.
>
> --
> Regards,
> Nazir Bilal Yavuz
> Microsoft
>
Hello!
I ran some speed tests on Nazir's v10 SIMD-only patch. I'm a bit surprised
at the regression for x86 with wide rows for the 1/3rd special characters
scenarios. I'm hoping it's something I did wrong. If anyone else has
numbers to share, that would be excellent.
x86 NARROW master 50,000,000 rows
TXT : 26359.319000 ms
CSV : 25661.199750 ms
TXT with 1/3 escapes: 28170.085250 ms
CSV with 1/3 quotes: 32638.147500 ms
x86 NARROW v10 50,000,000 rows
TXT : 26416.331500 ms -0.216290% regression
CSV : 25318.727500 ms 1.334592% improvement
TXT with 1/3 escapes: 28608.007500 ms -1.554565% regression
CSV with 1/3 quotes: 32805.627750 ms -0.513143% regression
x86 WIDE master 500,000 rows
TXT : 26475.164250 ms
CSV : 31963.478500 ms
TXT with 1/3 escapes: 29671.120750 ms
CSV with 1/3 quotes: 40391.616250 ms
x86 WIDE v10 500,000 rows
TXT : 23067.046750 ms 12.872885% improvement
CSV : 23259.092250 ms 27.232287% improvement
TXT with 1/3 escapes: 31796.098250 ms -7.161770% regression
CSV with 1/3 quotes: 42925.792250 ms -6.274015% regression
arm NARROW master 25,000,000 rows
TXT : 10077.096250 ms
CSV : 10310.671250 ms
TXT with 1/3 escapes: 9893.155000 ms
CSV with 1/3 quotes: 12133.064750 ms
arm NARROW v10 25,000,000 rows
TXT : 10467.816750 ms -3.877312% regression
CSV : 9986.288000 ms 3.146092% improvement
TXT with 1/3 escapes: 10323.173750 ms -4.346629% regression
CSV with 1/3 quotes: 11843.611750 ms 2.385654% improvement
arm WIDE master 250,000 rows
TXT : 10568.344750 ms
CSV : 13046.610500 ms
TXT with 1/3 escapes: 12193.088500 ms
CSV with 1/3 quotes: 16629.319000 ms
arm WIDE v10 250,000 rows
TXT : 9064.959000 ms 14.225366% improvement
CSV : 9019.553250 ms 30.866693% improvement
TXT with 1/3 escapes: 12344.497250 ms -1.241759% regression
CSV with 1/3 quotes: 15495.863750 ms 6.816005% improvement
--
-- Manni Wood EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2026-02-24 05:09:27 | Re: Row pattern recognition |
| Previous Message | Henson Choi | 2026-02-24 04:38:32 | Re: Row pattern recognition |