Re: pgbench - add pseudo-random permutation function
От | Fabien COELHO |
---|---|
Тема | Re: pgbench - add pseudo-random permutation function |
Дата | |
Msg-id | alpine.DEB.2.21.2004051422020.16227@pseudo обсуждение исходный текст |
Ответ на | Re: pgbench - add pseudo-random permutation function (Fabien COELHO <coelho@cri.ensmp.fr>) |
Список | pgsql-hackers |
> Attached is an attempt at improving things. I have added a explicit note and > hijacked an existing example to better illustrate the purpose of the > function. A significant part of the complexity of the patch is the overflow-handling implementation of (a * b % c) for 64 bits integers. However this implementation is probably never used because int128 bits are available and the one line implementation takes precedence, or the size is small enough (less than 48 bits) so that there are no overflows with the primes involved, thus the operation is done directly on 64 bits integers. I could remove the implementation and replace it with a "not available on this architecture" message, which would seldom be triggered: you would have to use a 32 bits arch (?) and test against a table with about 262 Trows, which I guess does not exists anywhere. This approach would remove about 40% of the code & comments. Thougths? -- Fabien.
В списке pgsql-hackers по дате отправления: