Re: Sort functions with specialized comparators

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Антуан Виолин <violin(dot)antuan(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Sort functions with specialized comparators
Date: 2024-12-20 17:16:29
Message-ID: A8E8C10A-F772-4236-982C-A5701B55EE8B@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 16 Dec 2024, at 14:02, John Naylor <johncnaylorls(at)gmail(dot)com> wrote:
>
> Sorry, I forgot this part earlier. Yes, let's have the private function.

PFA v6.

I was poking around intarray and trying not to bash everything. It seems to me that overall code readability should be seriously reworked. Even if no one is going to invent anything new around this code. Looks like overall project code standards matured far above, but this particular extension is forgotten. There is a lot of useless checks and optimizations for n < 2, copying data to new allocation when it's not necessary, small inconsistencies etc.

I don't think it's a matter of this particular thread though.

Best regards, Andrey Borodin.

Attachment Content-Type Size
v6-0001-Use-specialized-sort-facilities.patch application/octet-stream 4.9 KB
v6-0003-prefer-non-resizing-to-constructing-empty-array.patch application/octet-stream 953 bytes
v6-0002-Use-PREPAREARR-where-possible.patch application/octet-stream 1.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2024-12-20 17:27:13 Re: AIO v2.0
Previous Message Andres Freund 2024-12-20 16:39:42 Re: FileFallocate misbehaving on XFS