On Sun, May 8, 2016 at 7:46 PM, Thomas Munro <thomas.mu...@enterprisedb.com> wrote: > My aim with this thread was mainly reducing code duplication and > needless code: perhaps at least the other ideas in the attached > sketch, namely using ffs instead of the rightmost_one_pos table loop > and consolidation of popcount into a reusable API (without trying to > get hardware support) could be worth polishing for the next CF? > Annoyingly, it seems Windows doesn't have POSIX/SUSv2 ffs, though > apparently it can reach that instruction with MSVC intrinsic > _BitScanReverse or MingW __builtin_ffs.
I think my_log2() is the same thing as one of ffs() and fls() - I can never keep those straight. It seems like it wouldn't he hard to clean things up at least that much. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers