Re: A population of population counts - Mailing list pgsql-hackers

From Robert Haas
Subject Re: A population of population counts
Date
Msg-id CA+TgmoaceZMCibgqN26zAwdAQXfrosmn+Tp6QaOVFtB=hPexiA@mail.gmail.com
Whole thread Raw
In response to Re: A population of population counts  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On Sun, May 8, 2016 at 7:46 PM, Thomas Munro
<thomas.munro@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



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Declarative partitioning
Next
From: Robert Haas
Date:
Subject: Re: force_parallel_mode uniqueness