Closed mborland closed 3 weeks ago
Benchmarks showed improvement for the operation, but when run inside the decimal benchmarks it caused decimal32 to slow down by greater than a factor of 2. Continuing to investigate with uint64_t since that has many more operations in the search tree.
Improvements for uint64_t were inconclusive, but using the same method for computing log on uint128_t yielded an about 8% improvement.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.7%. Comparing base (
b4b08c2
) to head (6740d37
).:exclamation: Current head 6740d37 differs from pull request most recent head fe31a35
Please upload reports for the commit fe31a35 to get more accurate results.
Replaced by different method in: https://github.com/cppalliance/decimal/pull/647
Currently we use binary search tree to figure out the number of digits in a number. Looks like in the case of
std::uint32_t
we could covert to log calculation with a >15% speedup. I expect similar speedups for uint64_t and __uint128_t where it is more desparately needed.Closes: #643