Re: Sort functions with specialized comparators

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Stepan Neretin <sndcppg(at)gmail(dot)com>
Cc: Stepan Neretin <sncfmgg(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Антуан Виолин <violin(dot)antuan(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Sort functions with specialized comparators
Date: 2024-09-08 10:33:45
Message-ID: CAApHDvq3JzXqgkV0bmW1-xFVq5ei1SzkuesKMAwxLkEE4-NH0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 8 Sept 2024 at 20:51, Stepan Neretin <sndcppg(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Ford 2024-09-08 11:43:49 Re: [PoC] Add CANONICAL option to xmlserialize
Previous Message Dilip Kumar 2024-09-08 10:20:27 Deadlock due to locking order violation while inserting into a leaf relation