From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru> |
Cc: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: rand48 replacement |
Date: | 2021-07-06 06:13:36 |
Message-ID: | alpine.DEB.2.22.394.2107060805140.3858351@pseudo |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Yura,
> I believe most "range" values are small, much smaller than UINT32_MAX.
> In this case, according to [1] fastest method is Lemire's one (I'd take
> original version from [2]) [...]
Yep.
I share your point that the range is more often 32 bits.
However, I'm not enthousiastic at combining two methods depending on the
range, the function looks complex enough without that, so I would suggest
not to take this option. Also, the decision process adds to the average
cost, which is undesirable. I would certainly select the unbias multiply
method if we want a u32 range variant.
--
Fabien.
From | Date | Subject | |
---|---|---|---|
Next Message | Ronan Dunklau | 2021-07-06 06:15:41 | [PATCH] Use optimized single-datum tuplesort in ExecSort |
Previous Message | Dipesh Pandit | 2021-07-06 06:06:32 | Re: .ready and .done files considered harmful |