On Wed, 20 Jul 2022 at 16:21, Thomas Munro <thomas.mu...@gmail.com> wrote: > Back in commit 4f658dc8 we gained src/port/fls.c. As anticipated by > its commit message, we later finished up with something better in > src/include/port/pg_bitutils.h. fls() ("find last set") is an > off-by-one cousin of pg_leftmost_one_pos32().
Seems like a good idea to me. One thing I noticed was that pg_leftmost_one_pos32() expects a uint32 but the new function passes it an int. Is it worth mentioning that's ok in a comment somewhere or maybe adding an explicit cast? David