Re: [HACKERS] A population of population counts

2016-05-09 Thread Robert Haas
On Sun, May 8, 2016 at 7:46 PM, Thomas Munro 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 reu

Re: [HACKERS] A population of population counts

2016-05-08 Thread Thomas Munro
On Sat, May 7, 2016 at 4:26 PM, Tom Lane wrote: > David Rowley writes: >> I'd like to see us using those functions, when they're available and >> falling back on the array when they're not. Sounds like that would >> just be a new configure test. Perhaps a good home for some shared code >> would b

Re: [HACKERS] A population of population counts

2016-05-06 Thread Tom Lane
David Rowley writes: > I'd like to see us using those functions, when they're available and > falling back on the array when they're not. Sounds like that would > just be a new configure test. Perhaps a good home for some shared code > would be numutils.c. Meh --- numutils.c is about numbers. Ma

Re: [HACKERS] A population of population counts

2016-05-06 Thread David Rowley
On 7 May 2016 at 12:41, Thomas Munro wrote: > Hi > > I noticed that we have three "number_of_ones" tables under contrib and > two under src, and some new specially masked variants for visibility > maps. > > Would it be an improvement if we just defined one table with external > linkage, and access

[HACKERS] A population of population counts

2016-05-06 Thread Thomas Munro
Hi I noticed that we have three "number_of_ones" tables under contrib and two under src, and some new specially masked variants for visibility maps. Would it be an improvement if we just defined one table with external linkage, and accessed it via a macros/functions popcount_uint8, and wider vers