Re: Remove fls(), use pg_bitutils.h facilities instead?

Поиск
Список
Период
Сортировка
Искать
От
Thomas Munro
Тема
Re: Remove fls(), use pg_bitutils.h facilities instead?
Дата
Msg-id
CA+hUKGJ8YWFH7xmFwN+deGpcMBKAxXLjLUYisE6E_NwYtpq8VA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Remove fls(), use pg_bitutils.h facilities instead? Thomas Munro <thomas.munro@gmail.com>
Re: Remove fls(), use pg_bitutils.h facilities instead? Tom Lane <tgl@sss.pgh.pa.us>
Re: Remove fls(), use pg_bitutils.h facilities instead? Thomas Munro <thomas.munro@gmail.com>
Re: Remove fls(), use pg_bitutils.h facilities instead? Tom Lane <tgl@sss.pgh.pa.us>
Re: Remove fls(), use pg_bitutils.h facilities instead? Thomas Munro <thomas.munro@gmail.com>
Re: Remove fls(), use pg_bitutils.h facilities instead? Tom Lane <tgl@sss.pgh.pa.us>
Re: Remove fls(), use pg_bitutils.h facilities instead? Thomas Munro <thomas.munro@gmail.com>
Re: Remove fls(), use pg_bitutils.h facilities instead? Tom Lane <tgl@sss.pgh.pa.us>
Re: Remove fls(), use pg_bitutils.h facilities instead? David Rowley <dgrowleyml@gmail.com>
On Wed, Jul 20, 2022 at 5:26 PM Thomas Munro  wrote:
> On Wed, Jul 20, 2022 at 4:52 PM Tom Lane  wrote:
> > I think we could probably just drop fls() entirely.  It doesn't look
> > to me like any of the existing callers expect a zero argument, so they
> > could be converted to use pg_leftmost_one_pos32() pretty trivially.
> > I don't see that fls() is buying us anything that is worth requiring
> > readers to know yet another nonstandard function.
>
> That was not true for the case in contiguous_pages_to_segment_bin(),
> in dsa.c.  If it's just one place like that (and, hrrm, curiously
> there is an open issue about binning quality on my to do list...),
> then perhaps we should just open code it there.  The attached doesn't
> trigger the assertion that work != 0 in a simple make check.

That double eval macro wasn't nice.  This time with a static inline function.
В списке pgsql-hackers по дате отправления
От: Bharath Rupireddy
Дата:
От: Junwang Zhao
Дата:
Сообщение: Re: Memory leak fix in psql
FAQ