Re: pgbench - add pseudo-random permutation function

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, David Steele <david(at)pgmasters(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Hironobu SUZUKI <hironobu(at)interdb(dot)jp>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - add pseudo-random permutation function
Date: 2021-03-12 21:12:22
Message-ID: 20210312211222.GA30770@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2021-Mar-13, Thomas Munro wrote:

> That doesn't sound like a bad option to me, if it makes this much
> simpler. The main modern system without it seems to be MSVC. The
> Linux, BSD, Apple, illumos, AIX systems using Clang/GCC with
> Intel/AMD/ARM/PowerPC CPUs have it, and the Windows systems using open
> source compilers have it.

Hmm. Can we go a bit further, and say that if you don't have 128-bit
ints, then you can use pr_perm but only to a maximum of 32-bit ints?
Then you can do the calculations in 64-bit ints. That's much less bad
than desupporting the feature altogether.

Álvaro Herrera 39°49'30"S 73°17'W
"No necesitamos banderas
No reconocemos fronteras" (Jorge González)

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2021-03-12 21:30:41 Re: [patch] [doc] Minor variable related cleanup and rewording of plpgsql docs
Previous Message Thomas Munro 2021-03-12 21:06:48 Re: pgbench - add pseudo-random permutation function