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 1w159c-002XfN-1N for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 16:14:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w159a-0056VA-2n for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 16:14:23 +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 1w159a-0056V2-1u for pgsql-hackers@lists.postgresql.org; Fri, 13 Mar 2026 16:14:23 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w159Y-00000002V8m-3XYX for pgsql-hackers@postgresql.org; Fri, 13 Mar 2026 16:14:22 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-79906e5c7f1so25349907b3.1 for ; Fri, 13 Mar 2026 09:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773418459; cv=none; d=google.com; s=arc-20240605; b=g3qSZ0QxNnpM+wdYxJj9dhsU6Owj2t4ccMnCSpHx2QQ6tBmvTb9pdQe6MNdeq0uPPu U8eLjjZ1rKJoOQ0cMoSL0Bw7iH0Zh9Yh9eE1D4IUGuxzlugsca69VqCoAlXuZeXyPwYj tGBiYTIcwFWBMFO0bv/hRmNmRO+b4JjpzjTVBjtW6iRejOYIzrm21jHqPV/yxIh6HXce obXzC8PTYsvEf0YsZK3+DB0XXxsOHYbTeU60qm+K6k8qPz73sMQY5eJIpt2LdruEjr0X EVXMHjdGWVuIb9K7xYRvDFNoPV3UWjSVTQycpF/X+UzhpGX6lqO2+zzCMsjoFFTuDWeB e6RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4Q0VynFWvvqZnsIPKPyr3Us3KP4Lm8bcGv03QUVk538=; fh=O0B2IUk8YMwCUhzDKvAKqEKozMMrZtHuf9h3TBA0FZM=; b=S2JqZrD1DUnlI/GEeWGfXdSxJJazJ99dzuwzQs/MfemFHcwCrJhQPk9jL4MvXo0nfh 1ZQg++OtQLP43C/EF74go4ti7XSGHp1bBw30pHSrS8/BKelSMdo2/98ceZwOVdCvuTE/ 7heOJ7ydmCYTGRP/1lQXQlTvf4/uSdC/S6GmYgE5bglG0j0dhZZOgSKiQosLPXL068N5 wd2qVSRbI7aD7vQMa78ZCSrYL+KhTJoq51sDoLQgjqTnfn4A1vum4eu3Ys3XjsYOihV2 fNXm7PQ0DfjQQfQc/gqUSuhV2FFdeF85HSsZJxsGBLVkIHaXDzoM09JvksR2Y2fg46Ym zVSQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773418459; x=1774023259; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4Q0VynFWvvqZnsIPKPyr3Us3KP4Lm8bcGv03QUVk538=; b=VfG1mBJgwYGc7y6xHdsBZ5FF8z7yXCzMMGtOvgBEQ5hJGIljx9scyJ61KKe3uDRcg7 Rzx3kZjuira0Fszke2Ox5ueuUQ8BOTTOxPIDZm/Jx/g1YhwkxeQGiJnj8ohLX2dTWMc+ tJq5loTY918jG+AGrHdeDPUoDctV7xv3y5wmk1PNC/CypPrZpNwmxypaItKQCh0EZcSD mS8s1CegDKPHFuU1x4JqA+ub6VSnYx6YxIQymltyeN6GNGRkltCRyDI8fXZodb2ZBup8 neYwyYWjrW0Y7xcAyOPTi5PDvVKs4fGDwJoNqkWGktzbUsHXHaNOEgGULgcjeQNZYnWk cqGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773418459; x=1774023259; h=content-transfer-encoding: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=4Q0VynFWvvqZnsIPKPyr3Us3KP4Lm8bcGv03QUVk538=; b=XYMkvr0dFsYPYhb5cDPUpNOJZvG6X85vmqp2TBsqEcp4E2GHZD3syV0W/F1UPyP6fH a5Gc4OmT3ab85WZvJKaB/ChLk91jmhUgkpJg1Buyd1aDlqZDH8kHXDn/aYf1d5u0Z1l+ tsSLB+Au5a4eyx5CT31Y4P2xRdduoOxlfJ2jcQBHDnpOCDxkSkVY+b/Zul82EKcjd4Ok tooAbsTt20+g9R23mzMbJIO7Rlctl+qMPJqbM0taYq103GtqzBARWg4sMPWSg+tiN8RJ EjFiTjgcQMvCfyEnqHxtyoQMYAA1BGFjM5K8LmSv1UeTM0ZRPgDavoK1lA7Ol5N/BHbB 7Zdg== X-Forwarded-Encrypted: i=1; AJvYcCWpvLNYrXopZ/uTveAjFK/9SoaO4M0KOb5r/IyX4d7kZ6hDdeYKuOT0hwzN509HYiu5jpj41tmniUqxX1zq@postgresql.org X-Gm-Message-State: AOJu0YzjpnHIucIfjfFPEuCM73JVcxmlsa5bxxLHEmw6ndPPFt6C915k IMCCKkNVhUTxUp08H5G2ToY4e4+bcxIPMcU5CzdYbcgX+pRa2Vx0XTeQoIWVleEAOotvuMSbOfK GPyHBMIrVpW3V/fXxN7egwPrN/hWaSow= X-Gm-Gg: ATEYQzzXJq30kKGHVUwm7BUNtuZ/5YV0T/7AsAgG/HP3usnCIQRuzoC/HJwLb5KEtZr tF/FRIxApgtSnX1QcFry7ELDwQzxd0oGYpDSo2ih56SFARv9qw8VQSOY7kkbmkrDsLMKOXdZuhL 9rSqQ3qSyHgHxv9Fexwf7EeZqDzOE5Wm8OrR0YpgLTHredC3PQk114EL7cAWAnG8dQQcX31+kP6 v9a72a0x93A60LqxAdq1yrzMwo6iz7Omhv7yJm4SjMHOJlMK7P2qbIiGd/e9eWeLtwqFkfZGhD6 bRr18M0= X-Received: by 2002:a05:690c:7084:b0:795:294c:fd31 with SMTP id 00721157ae682-79a1c1a7751mr39461827b3.38.1773418459147; Fri, 13 Mar 2026 09:14:19 -0700 (PDT) MIME-Version: 1.0 References: <43de48dc-701b-4735-881b-50bca6870f39@app.fastmail.com> In-Reply-To: <43de48dc-701b-4735-881b-50bca6870f39@app.fastmail.com> From: Nazir Bilal Yavuz Date: Fri, 13 Mar 2026 19:14:06 +0300 X-Gm-Features: AaiRm51MW0yj9V0Cp4iUtUGCJTpMGVW2lkkzKl5Vj5LPfLm4ZFL-WZ-ouont1Dk Message-ID: Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD To: Greg Burd Cc: Nathan Bossart , Manni Wood , KAZAR Ayoub , Neil Conway , Andrew Dunstan , Shinya Kato , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Greg, On Fri, 13 Mar 2026 at 18:29, Greg Burd wrote: > > I've always been a fan of these kinds of optimization so I couldn't resis= t reviewing, but I know you're ready to commit so I'll just check on some s= ystems I have. :) Thank you for the review! > At first glance the implementation seems conservative, but correct and sa= fe. Local testing on on Linux/FreeBSD x86_64, and Win11/aarch64/MSVC seem g= ood. I also tried IllumOS/SPARCv9 and with some fixes (from another active = thread) to the build system and it worked just fine too. I'm sure the 10 p= eople care will be thrilled. ;- Yes, we can probably improve this further with heuristics, but for now we wanted to avoid introducing any potential regressions. > I also created a few tests (attached) to check boundary conditions, I mig= ht add some along with the RISC-V work. Thank you for the tests! I have checked them and the output is the same on both v17 and master. Do you think it would make sense to add them as regression tests? --=20 Regards, Nazir Bilal Yavuz Microsoft