Re: pgbench - add pseudo-random permutation function - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench - add pseudo-random permutation function
Date
Msg-id alpine.DEB.2.21.1809261305270.22248@lancre
Whole thread Raw
In response to Re: pgbench - add pseudo-random permutation function  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: pgbench - add pseudo-random permutation function  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hello,

> That is necessary because most people consume PostgreSQL through
> packages from distributions that have to work on an Athlon II or
> whatever, so we can't just use -msse4.2 for every translation unit.
> So it becomes our job to isolate small bits of code that use newer
> instructions, if it's really worth the effort to do that, and supply
> our own runtime checks and provide a fallback.

Ok. That was my understanding so as to improve the portability/performance 
compromise. I do not think that pgbench is worth the effort on this 
particular point.

> [...] None of that seems worth it for something like this.

Indeed.

So, am I right to deducing that you are satisfied with the current status 
of the patch, with the nbits implementation either based on popcount (v4) 
or clz (v5) compiler intrinsics? I think that the clz option is better.

-- 
Fabien.


pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pgbench - add pseudo-random permutation function
Next
From: Fabien COELHO
Date:
Subject: Re: Online verification of checksums