On Thursday, 27 February 2020 at 03:58:15 UTC, Bruce Carneal
wrote:
On Wednesday, 26 February 2020 at 23:09:34 UTC, Basile B. wrote:
On Wednesday, 26 February 2020 at 20:44:31 UTC, Bruce Carneal
wrote:
After shuffling the input, branchless wins by 2.4X (240%).
snip
Let me know if the above is unclear or insufficient.
The 2.4X improvement came when using a shuffled uniform digits
distribution. Equal numbers of 1 digit values, 2 digit values,
... put in to an array and shuffled.
Branchless *loses* by 8.5% or so on my Zen1 when the array is not
shuffled (when branch predictions are nearly perfect).