Re: Performance degradation on concurrent COPY into a single relation in PG16. - Mailing list pgsql-hackers

From David Rowley
Subject Re: Performance degradation on concurrent COPY into a single relation in PG16.
Date
Msg-id CAApHDvrVP+4dJNt9Lv+jbaM+wP-LWm58B00T0aGKqdthP1Af8w@mail.gmail.com
Whole thread Raw
In response to Re: Performance degradation on concurrent COPY into a single relation in PG16.  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: Performance degradation on concurrent COPY into a single relation in PG16.
List pgsql-hackers
On Wed, 2 Aug 2023 at 01:26, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>
> On Tue, 1 Aug 2023 at 13:55, David Rowley <dgrowleyml@gmail.com> wrote:
> >
> > I tried adding the "at least 1 digit check" by adding an else { goto
> > slow; } in the above code, but it seems to generate slower code than
> > just checking if (unlikely(ptr == s)) { goto slow; } after the loop.
> >
>
> That check isn't quite right, because "ptr" will not equal "s" if
> there is a sign character, so it won't detect an input with no digits
> in that case.

Ah, yeah. Thanks.

Here's a patch with an else condition when the first digit check fails.

master + fastpath4.patch:
latency average = 1579.576 ms
latency average = 1572.716 ms
latency average = 1563.398 ms

(appears slightly faster than fastpath3.patch)

David

Attachment

pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Next
From: "Tristan Partin"
Date:
Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG