Re: pgbench - add pseudo-random permutation function

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, 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-04-06 21:31:31
Message-ID: alpine.DEB.2.22.394.2104062329130.2555247@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Dean,

> Pushed.
>
> I decided not to go with the "joke" randu64() function, but instead
> used getrand() directly. This at least removes any *direct* use of
> doubles in permute() (though of course they're still used indirectly),
> and means that if getrand() is improved in the future, permute() will
> benefit too.

Good idea, at least it is hidden and in one place.

Thanks for the push!

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-04-06 22:46:10 Re: Stronger safeguard for archive recovery not to miss data
Previous Message Fabien COELHO 2021-04-06 21:29:01 Re: psql - add SHOW_ALL_RESULTS option