Re: More speedups for tuple deformation
| От | David Rowley |
|---|---|
| Тема | Re: More speedups for tuple deformation |
| Дата | |
| Msg-id | CAApHDvpsxOFV2V1BUfA-JNPXYdXAeq0y+Xi2Yh13+BonLLCOxQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: More speedups for tuple deformation (John Naylor <johncnaylorls@gmail.com>) |
| Ответы |
Re: More speedups for tuple deformation
|
| Список | pgsql-hackers |
On Sat, 31 Jan 2026 at 15:48, John Naylor <johncnaylorls@gmail.com> wrote: > + res += __builtin_ctz(~bits[bytenum]); > If bits[bytenum] is 255, then __builtin_ctz(0) is undefined. The top > of the function says Oops, I forgot to cast the byte to uint32 before the bitwise-not. I've fixed locally. Still processing Andres' comments. > + * We expect that 'bits' contains at least one 0 bit somewhere in the mask, > + * not necessarily < natts. > > ...in which case it should be well defined everywhere. Am I missing > something? If we need to handle the 255 case, this should work: > > pg_rightmost_one_pos32(~((uint32) bits[bytenum])) I'd rather handle that in a single byte as the fallback path in that function requires byte-at-a-time processing. David
В списке pgsql-hackers по дате отправления: