Re: Optimizing COPY with SIMD

2024-06-07 Thread Neil Conway
On Wed, Jun 5, 2024 at 3:05 PM Nathan Bossart wrote: > For pg_lfind32(), we ended up using an overlapping approach for the > vectorized case (see commit 7644a73). That appeared to help more than it > harmed in the many (admittedly branch predictor friendly) tests I ran. I > wonder if you could

Re: Optimizing COPY with SIMD

2024-06-05 Thread Nathan Bossart
On Wed, Jun 05, 2024 at 01:46:44PM -0400, Neil Conway wrote: > We could go further and use the same code to handle both the tail of the > string in the vectorized case and the entire string in the non-vectorized > case, but I didn't bother with that -- as written, it would require taking > an unnec

Re: Optimizing COPY with SIMD

2024-06-05 Thread Neil Conway
Thanks for the review and feedback! On Mon, Jun 3, 2024 at 10:56 AM Nathan Bossart wrote: > > -/* > > - * Send text representation of one attribute, with conversion and > escaping > > - */ > > #define DUMPSOFAR() \ > > IIUC this comment was meant to describe the CopyAttributeOutText() function

Re: Optimizing COPY with SIMD

2024-06-03 Thread Nathan Bossart
On Sun, Jun 02, 2024 at 03:17:21PM -0400, Neil Conway wrote: > master @ 8fea1bd541: > > $ for i in ~/*.sql; do hyperfine --warmup 5 "./psql -f $i"; done > Benchmark 1: ./psql -f /Users/neilconway/copy-out-bench-long-quotes.sql > Time (mean ± σ): 2.027 s ± 0.075 s[User: 0.001 s, System:

Re: Optimizing COPY with SIMD

2024-06-03 Thread Neil Conway
On Mon, Jun 3, 2024 at 9:22 AM Joe Conway wrote: > Welcome back! > Thanks Joe! It's been a minute :) Neil

Re: Optimizing COPY with SIMD

2024-06-03 Thread Joe Conway
On 6/2/24 15:17, Neil Conway wrote: Inspired by David Rowley's work [1] Welcome back! -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com