Strange counter-performance in an alternative `decimalLength9` function

Stefan Koch uplink.coder at googlemail.com
Wed Feb 26 10:11:32 UTC 2020


On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
> So after reading the translation of RYU I was interested too 
> see if the decimalLength() function can be written to be 
> faster, as it cascades up to 8 CMP.
>
> [...]

It can be made faster using binary search. Not by much though.

You'll get ceil(log2(numberofplaces)) cmps.


More information about the Digitalmars-d-learn mailing list