[flang] Tuning up binary->decimal conversion
authorpeter klausler <pklausler@nvidia.com>
Tue, 14 Jul 2020 19:38:03 +0000 (12:38 -0700)
committerpeter klausler <pklausler@nvidia.com>
Tue, 14 Jul 2020 20:22:26 +0000 (13:22 -0700)
commitce6f0303df51667f42a2a63eb292ab7c0c125eea
tree4a39df5b6981edeccfb542ee712815b07f4062d1
parent6b476e2426e9cfa442dac5deed2ceae890513f18
[flang] Tuning up binary->decimal conversion

Use short division of big-radix values by powers of two when
converting values with negative unbiased exponents rather than
multiplication by smaller powers of five; this reduces the overall
outer iteration count. This change is a win across the entire range
of inputs.

Reviewed By: tskeith

Differential Revision: https://reviews.llvm.org/D83806
flang/include/flang/Decimal/decimal.h
flang/lib/Decimal/big-radix-floating-point.h
flang/lib/Decimal/binary-to-decimal.cpp