Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)
Дата
Msg-id CAEudQAqTNYDZ0RchO4-jHwQ0WkBAh9X0doS4VecGZ8MOt6T=hw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)  (John Naylor <johncnaylorls@gmail.com>)
Ответы Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)  (John Naylor <johncnaylorls@gmail.com>)
Список pgsql-hackers
Em ter., 9 de jan. de 2024 às 06:31, John Naylor <johncnaylorls@gmail.com> escreveu:
On Thu, Dec 28, 2023 at 7:58 PM Ranier Vilela <ranier.vf@gmail.com> wrote:
> I think it would be more productive to initialize the entire array with -1, and avoid flagging, one by one, the items that should be -1.

This just moves an operation from one place to the other, while
obliterating the explanatory comment, so I don't see an advantage.
Well, I think that is precisely the case for using memset.
The way initialization is currently done is much slower and harmful to the branch.
Of course, the gain should be small, but it is fully justified for switching to memset.
Regarding the comment, once initialization is done via memset, such as prstate.marked, it becomes irrelevant and unnecessary.

Best regards,
Ranier Vilela

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

Предыдущее
От: jian he
Дата:
Сообщение: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Следующее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx