Re: Sort functions with specialized comparators - Mailing list pgsql-hackers

From David Rowley
Subject Re: Sort functions with specialized comparators
Date
Msg-id CAApHDvq3JzXqgkV0bmW1-xFVq5ei1SzkuesKMAwxLkEE4-NH0w@mail.gmail.com
Whole thread Raw
In response to Sort functions with specialized comparators  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Responses Re: Sort functions with specialized comparators
List pgsql-hackers
On Sun, 8 Sept 2024 at 20:51, Stepan Neretin <sndcppg@gmail.com> wrote:
> Hi! I rebase, clean and some refactor my patches.

I'm unsure what exactly is going on with this thread. It started with
Andrey proposing a patch to speed up intarray sorting and now it's
turned into you proposing 10 patches which implement a series of sort
specialisation functions without any justification as to why the
change is useful.

If you want to have a performance patch accepted, then you'll need to
show your test case and the performance results before and after.

What this patch series looks like to me is that you've just searched
the code base for qsort and just implemented a specialised qsort
version without any regard as to whether the change is useful or not.
For example, looking at v2-0006, you've added a specialisation to sort
the columns which are specified in the CREATE STATISTICS command. This
seems highly unlikely to be useful. The number of elements in this
array is limited by STATS_MAX_DIMENSIONS, which is 8. Are you claiming
the sort specialisation you've added makes a meaningful performance
improvement to sorting an 8 element array?

It looks to me like you've just derailed Andrey's proposal. I suggest
you validate which ones of these patches you can demonstrate produce a
meaningful performance improvement, ditch the remainder, and then
start your own thread showing your test case and results.

David



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Deadlock due to locking order violation while inserting into a leaf relation
Next
From: Oliver Ford
Date:
Subject: Re: [PoC] Add CANONICAL option to xmlserialize