Strange counter-performance in an alternative `decimalLength9` function

Bruce Carneal bcarneal at gmail.com
Wed Feb 26 19:44:05 UTC 2020


On Wednesday, 26 February 2020 at 13:50:11 UTC, Basile B. wrote:
> On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
> ...
>     foreach (i; 0 .. count)
>         sum += funcs[func](i);

The input stream is highly predictable and strongly skewed 
towards higher digits.

The winning function implementation lines up with that 
distribution.  It would not fare as well with higher entropy 
input.









More information about the Digitalmars-d-learn mailing list