Re: A population of population counts

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A population of population counts
Date: 2016-05-09 11:53:47
Message-ID: CA+TgmoaceZMCibgqN26zAwdAQXfrosmn+Tp6QaOVFtB=hPexiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 8, 2016 at 7:46 PM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-05-09 12:50:40 Re: force_parallel_mode uniqueness
Previous Message Ashutosh Bapat 2016-05-09 11:21:08 Re: Declarative partitioning