Re: glibc qsort() vulnerability

Поиск
Список
Период
Сортировка
От Andrey M. Borodin
Тема Re: glibc qsort() vulnerability
Дата
Msg-id B9DFF152-D31B-4E2D-A3DD-0AB92BFF71E4@yandex-team.ru
обсуждение исходный текст
Ответ на Re: glibc qsort() vulnerability  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: glibc qsort() vulnerability  (Nathan Bossart <nathandbossart@gmail.com>)
Re: glibc qsort() vulnerability  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers

> On 8 Feb 2024, at 06:52, Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> For the same compASC() test, I see an ~8.4% improvement with your int64
> code and a ~3.4% improvement with this:

If we care about branch prediction in comparison function, maybe we could produce sorting that inlines comparator, thus
eliminatingfunction call to comparator? We convert comparison logic to int, to extract comparison back then. 

I bet “call" is more expensive than “if".


Best regards, Andrey Borodin.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Printing backtrace of postgres processes
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Make COPY format extendable: Extract COPY TO format implementations