Re: pgbench - add pseudo-random permutation function

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Hironobu SUZUKI <hironobu(at)interdb(dot)jp>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: pgbench - add pseudo-random permutation function
Date: 2019-03-03 08:55:58
Message-ID: alpine.DEB.2.21.1903030947200.8095@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> Indeed, the patch needs a rebase & conflit resolution. I'll do it. Later.

Here is an update:

- take advantage of pg_bitutils (although I noted that the "slow"
popcount there could be speeded-up and shorten with a bitwise operator
implementation that I just removed from pgbench).

- add comments about the bijective transformations in the code.

As already stated, this function makes sense for people who want to test
performance with pgbench using non uniform rands. If you do not want to do
that, you will probably find the function pretty useless. I can't help it.

Also, non uniform rands is also a way to test pg lock contention behavior.

--
Fabien.

Attachment Content-Type Size
pgbench-prp-func-14.patch text/x-diff 17.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anastasia Lubennikova 2019-03-03 09:46:15 Re: [PATCH] kNN for btree
Previous Message Noah Misch 2019-03-03 08:06:20 Re: libpq environment variables in the server