Re: Speed up COPY FROM text/CSV parsing using SIMD

KAZAR Ayoub <ma_kazar@esi.dz>

From: KAZAR Ayoub <ma_kazar@esi.dz>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>, nathandbossart@gmail.com, ants.aasma@cybertec.at
Cc: Andrew Dunstan <andrew@dunslane.net>, Shinya Kato <shinya11.kato@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-21T06:44:06Z
Lists: pgsql-hackers
On Tue, Oct 21, 2025, 8:17 AM KAZAR Ayoub <ma_kazar@esi.dz> wrote:

>
> Currently we are at 200-400Mbps which isn't that terrible compared to
> production and non production grade parsers (of course we don't only parse
> in our case), also we are using SSE2 only so theoretically if we add
> support for avx later on we'll have even better numbers.
> Maybe more micro optimizations to the current heuristic can squeeze it
> more.
>
>
> [1]
> https://branchfree.org/2019/03/06/code-fragment-finding-quote-pairs-with-carry-less-multiply-pclmulqdq/
> [2]
> https://github.com/AyoubKaz07/postgres/commit/73c6ecfedae4cce5c3f375fd6074b1ca9dfe1daf
> [3] https://agner.org/optimize/instruction_tables.pdf
> [4] https://www.uops.info/table.html
>
> Regards,
> Ayoub Kazar.
>
Sorry, I meant 200-400MB/s.


Regards.
Ayoub Kazar.

>