Re: [HACKERS] JIT compiling expressions/deform + inlining prototype v2.0

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: [HACKERS] JIT compiling expressions/deform + inlining prototype v2.0
Дата
Msg-id CAM-w4HNrnxC5z4Np1vuUn0pbgRBVS=g6NL2J52nJ8fhNXrSx2Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] JIT compiling expressions/deform + inlining prototypev2.0  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Ответы Re: [HACKERS] JIT compiling expressions/deform + inlining prototype v2.0  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 5 September 2017 at 11:58, Konstantin Knizhnik
<k.knizhnik@postgrespro.ru> wrote:
>
> I wonder if we can perform some optimization in this case (assuming that in
> typical cases column either contains mostly non-null values, either mostly
> null values).

If you really wanted to go crazy here you could do lookup tables of
bits of null bitmaps. Ie, you look at the first byte of the null
bitmap, index into an array and it points to 8 offsets for the 8
fields covered by that much of the bitmap. The lookup table might be
kind of large since offsets are 16-bits so you're talking 256 * 16
bytes or 2kB for every 8 columns up until the first variable size
column (or I suppose you could even continue in the case where the
variable size column is null).

-- 
greg



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

Предыдущее
От: Jesper Pedersen
Дата:
Сообщение: Re: [HACKERS] Fix performance of generic atomics
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Fix performance of generic atomics