Re: move some bitmapset.c macros to bitmapset.h
| От | Tom Lane |
|---|---|
| Тема | Re: move some bitmapset.c macros to bitmapset.h |
| Дата | |
| Msg-id | 3555640.1670306251@sss.pgh.pa.us обсуждение |
| Ответ на | Re: move some bitmapset.c macros to bitmapset.h (David Rowley <dgrowleyml@gmail.com>) |
| Ответы |
Re: move some bitmapset.c macros to bitmapset.h
|
| Список | pgsql-hackers |
David Rowley <dgrowleyml@gmail.com> writes:
> Maybe there's a path of lesser resistance... There's been a bit of
> work in pg_bitutils.h to define some of the bit manipulation functions
> for size_t types which wrap the 32 or 64-bit version of the function
> accordingly. Couldn't we just define one of those for
> pg_rightmost_one_pos and then use a size_t as the bitmap word type?
It doesn't seem particularly wise to me to hard-wire the bitmap
word size as sizeof(size_t). There is not a necessary connection
between those things: there could be a performance reason to
choose a word width that's different from size_t.
If we do put RIGHTMOST_ONE functionality into pg_bitutils.h,
I'd envision it as pg_bitutils.h exporting both 32-bit and
64-bit versions of that, and then bitmapset.c choosing the
appropriate one just like it chooses bmw_rightmost_one_pos.
regards, tom lane
В списке pgsql-hackers по дате отправления: