Thread
-
Re: [PATCH] Add pg_lfind8_nonzero()
Peter Eisentraut <peter@eisentraut.org> — 2025-12-17T15:09:42Z
On 14.12.25 14:33, cca5507 wrote: > With pg_lfind8_nonzero(), we can write the code like this: > > ``` > if (likely(numberOfAttributes > 0)) > hasnull = pg_lfind8_nonzero((uint8 *) isnull, numberOfAttributes); > ``` > > The pg_lfind8_nonzero() is faster because we can handle 8 bool values at a time. Maybe you could try popcount for this? hasnull = (pg_popcount((char *) isnull, numberOfAttributes) > 0);