Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0JXa-001nrg-0V for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 13:23:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0JXX-00990s-0q for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 13:23:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0JXW-00990j-2x for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 13:23:55 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w0JXU-000000028jz-3Utf for pgsql-hackers@postgresql.org; Wed, 11 Mar 2026 13:23:54 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-660dcafc85aso13877226a12.0 for ; Wed, 11 Mar 2026 06:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773235432; cv=none; d=google.com; s=arc-20240605; b=JdiwpmXGWhDCkACOCl1mWaX04Yp8QZ+dmkn6alsQmB372Iqo0OgNDvklI8iWr131O3 y+POpjlmf6lZI2DEnPsYV29jq5nTWg3WAdm20VoFXQjapAoCzZgETV4NWdcXICX49C8d ZLNuNuhg8SyirPz2AKcsq6CME6Wqg/Ez04k2cOcrdW/o16SJr/WaeAUJ9AwIMfchGJGJ Qg38AW8EdGXwtBlUe6sCTIajdMCRlbPPuCq3t7bhYUzESkkqCu38KpQG9FtkESGbkOFi yDVLvAbAyYK0tsSOh/IP1TtFW6Ih5uzKEIxglNw0m8E6wxwPAblAVO0lxnFbNuDvujxP B8BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=XEhg0XqjNrEkggL/xLUb8wnrzmResZGJBYL8P5veNRc=; fh=kfQGuocuYc2i8wglF0Ri94OTWq8V8RmMR/OnmblXbkk=; b=hrAUyxP24J2elVwJSr2THZycN7DtyPaBnI+UoSZZIYPS5Ndj6cjtUta3X3pEDy0DrH tD3+LnU6s/hktcBo5MJUQojO7nb40DXWDHNlDrNhyHLdNkYcoTQQsTKDC8LqP4tUdr9m HzzIhyl6TQQMMiaSMxwrPNyMba8J7xzjQF/Csq+IvAVMqwps4+0DOPpzs+DNVR5xgY1b uVrplrfIH12SpKMV4GFFLx0v/HfmkhrQxwki6sKrPGFSSZlG9sNLtxtMGbC4jrlr2jwu WmhbtlOs8ZUAS4yaRMibPoiw9Bv02dO+nGbUczpkm2Q2tYzt4hYbVGTzpRfGfxVKG6xU MqDQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=esi.dz; s=google; t=1773235432; x=1773840232; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XEhg0XqjNrEkggL/xLUb8wnrzmResZGJBYL8P5veNRc=; b=Ye7YR42yJTOMVjdtF5eNyDz3qVDlsHZe3DDuS9pR2l3Vcr2MRrO1P2awIy7lZjgOWT t0z3P4nDZGb6Qwrp1UesdV/EvijsZ04GC1AA5VTOpwCGyE8xZIRANHqWqEV0sxWQHndr hn0/R2hnvkbtd9koCDkf2mP1lv55GUbLH2+pM9dcFFd9P3X0xarVQYAGdA2ibFAiJe/r OQmOobilCKq/fRlsOWCsPfkacm4s6hACRqP5mqj4besduYUgCv2Yi+1Ldr1ASLB7VkJb P8mzAjN4XeWTvCV7dOYAPvWt2+na9prs4accqKxc+D7B1sHYO8vRtVY+zKyQ57g4Z6r3 tfEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773235432; x=1773840232; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XEhg0XqjNrEkggL/xLUb8wnrzmResZGJBYL8P5veNRc=; b=lsjaoam083HCbIlzi+h+CQ1RF+vkD3Sju/qPMz1xWlhphELXhacuruvGVKdA82nAr3 4P9eu4B0x3k6BWHpig3kJhUBNTxJ1Fo2U9dq6tCB4qRH0LygH2IF8u628NLikAgjCTXZ eFBBPQpBrSlVmJz0u6h469dLxwFIlM9M2gSvCqd7QKt2PmP/0fuJ6zAfG5+BWSNPa2hw yhLyTdEoV52nt1O8+0nbd+wgd6VFGT7M3f6Kd2mHU+i59uR5XKOrBsL4P2jZllsKSYmY LJ7ZEEk33t7SbBGsJ3sMxIm2u2cU5/p0yIKkNuEYgutVxBfCoiSfLhpwKgWxDrOa/oEc 2fjw== X-Forwarded-Encrypted: i=1; AJvYcCUWufA8/MRlse5T6KxEFcLQjhJEpYYdSs3464bWDmIKCCFOWzYYcW23ivQrnOtt0EvXe58TWTGI4Nu3dcuu@postgresql.org X-Gm-Message-State: AOJu0YzhqPJse0jS4XQLxWNAiZDbJOXgNqETzqLGkz9myIBGljwjc4Ua 28PV8CiPHMlullSw8M1aAGu7ttcxorPsJ0MkYoqU6keK0sXisG9TUijSHo+SEgyaDketeuD16XU hzCaN7FJoHd3A2AziR5JbEA2G3lShwHkWjaC/J+nH X-Gm-Gg: ATEYQzwWvbX43OVfDBT32vAT1wfpSgJyApU7ThcJoZMSBPTVCMS2h22F8tyxMxuPS/o dv3gpZIqt5BEROGjOQoWAYiaLa52i95nDyqRM8xhWMZQ2l/G8FrLgnrQpVZ/P4daedNuE091qzI cfmDuZJ8J+eR/UKhftCfOKmgBRRwnM0nDE9TAxK7OuGFwhXU5nk5EEQ7aQyXuA/tO9wyI7Z0iHi spFur1Puqf+9QV2tIcbCMEMPa9+cuct8FnAlO2wyF8wPAizpLw7LtzEpEqx68V+EkY3UQQIORuT FWAbym3op+2T7AeJbKB07SAnhkvftHys818SoiQDTLR/0EFtIxG8ov9ptsEoK9vJC4Ui X-Received: by 2002:a05:6402:5201:b0:65f:8271:3f8c with SMTP id 4fb4d7f45d1cf-663194bf59dmr1387261a12.5.1773235431742; Wed, 11 Mar 2026 06:23:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: KAZAR Ayoub Date: Wed, 11 Mar 2026 14:23:41 +0100 X-Gm-Features: AaiRm516_p2ROsbrCUfEM-vP_7RxeYqoNR80wYBgrdYuXIb1w8o56gu0nLhSnCM Message-ID: Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD To: Nazir Bilal Yavuz Cc: Nathan Bossart , Manni Wood , Neil Conway , Andrew Dunstan , Shinya Kato , PostgreSQL-development Content-Type: multipart/alternative; boundary="000000000000032844064cbf8cea" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000032844064cbf8cea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 11, 2026 at 2:10=E2=80=AFPM Nazir Bilal Yavuz wrote: > Hi, > > On Wed, 11 Mar 2026 at 15:19, KAZAR Ayoub wrote: > > > > On Wed, Mar 11, 2026, 12:36 PM Nazir Bilal Yavuz > wrote: > >> > >> 0002 has an attempt to remove some branches from SIMD code but since > >> it is kind of functional change, I wanted to attach that as another > >> patch. I think we can apply some parts of this, if not all. > > > > 0002 sounds really good to have, haven't measured the diff but it's ver= y > logical. > > I agree with you. I saw very small speedups like 1%-2% but I think > changes make sense regardless of the performance improvement. > > > Another quick question though, do we need USE_NO_SIMD for any reason? I > just remembered that there's some simd paths like json that don't use it. > > vector8_eq() and vector8_highbit_mask() don't have non-SIMD > implementations, so we need to use USE_NO_SIMD. > Aha ! that's true, thanks. Regards, Ayoub --000000000000032844064cbf8cea Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Mar 11, 2026 at 2:10=E2=80=AFPM N= azir Bilal Yavuz <byavuz81@gmail.c= om> wrote:
Hi,

On Wed, 11 Mar 2026 at 15:19, KAZAR Ayoub <ma_kazar@esi.dz> wrote:
>
> On Wed, Mar 11, 2026, 12:36 PM Nazir Bilal Yavuz <byavuz81@gmail.com> wrote: >>
>> 0002 has an attempt to remove some branches from SIMD code but sin= ce
>> it is kind of functional change, I wanted to attach that as anothe= r
>> patch. I think we can apply some parts of this, if not all.
>
> 0002 sounds really good to have, haven't measured the diff but it&= #39;s very logical.

I agree with you. I saw very small speedups like 1%-2% but I think
changes make sense regardless of the performance improvement.=C2=A0


> Another quick question though, do we need USE_NO_SIMD for any reason? = I just remembered that there's some simd paths like json that don't= use it.

vector8_eq() and vector8_highbit_mask() don't have non-SIMD
implementations, so we need to use USE_NO_SIMD.
Aha ! = that's true, thanks.

Regards,
Ayoub<= /div>
--000000000000032844064cbf8cea--