Re: A qsort template
От | Peter Geoghegan |
---|---|
Тема | Re: A qsort template |
Дата | |
Msg-id | CAH2-Wz==X6rxnFNBn2yH=xmNdCAvQxFMnDdMoTgn2V5guQEB-A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: A qsort template (Thomas Munro <thomas.munro@gmail.com>) |
Ответы |
Re: A qsort template
|
Список | pgsql-hackers |
On Sun, Apr 10, 2022 at 2:44 PM Thomas Munro <thomas.munro@gmail.com> wrote: > David Rowley privately reported a performance regression when sorting > single ints with a lot of duplicates, in a case that previously hit > qsort_ssup() but now hits qsort_tuple_int32() and then has to call the > tiebreaker comparator. That's not good. The B&M quicksort implementation that we adopted is generally extremely fast for that case, since it uses 3 way partitioning (based on the Dutch National Flag algorithm). This essentially makes sorting large groups of duplicates take only linear time (not linearithmic time). -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: