cppalliance / decimal

A C++14 implementation of IEEE 754 decimal floating point numbers
https://cppalliance.org/decimal/decimal.html
Boost Software License 1.0
17 stars 1 forks source link

Improve `num_digits()` for `uint256_t` #660

Closed mborland closed 2 weeks ago

mborland commented 2 weeks ago

Improves decimal128 by 6.369x and decimal128_fast by 4.651 in >=C++17 modes.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.5%. Comparing base (556a5d2) to head (0424598).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cppalliance/decimal/pull/660/graphs/tree.svg?width=650&height=150&src=pr&token=drvY8nnV5S&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance)](https://app.codecov.io/gh/cppalliance/decimal/pull/660?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ```diff @@ Coverage Diff @@ ## develop #660 +/- ## ========================================= + Coverage 98.5% 98.5% +0.1% ========================================= Files 221 221 Lines 15661 15673 +12 Branches 1722 1726 +4 ========================================= + Hits 15416 15428 +12 Misses 245 245 ``` | [Files](https://app.codecov.io/gh/cppalliance/decimal/pull/660?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) | Coverage Δ | | |---|---|---| | [...lude/boost/decimal/detail/integer\_search\_trees.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/660?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Finteger_search_trees.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9pbnRlZ2VyX3NlYXJjaF90cmVlcy5ocHA=) | `100.0% <ø> (ø)` | | | [test/test\_big\_uints.cpp](https://app.codecov.io/gh/cppalliance/decimal/pull/660?src=pr&el=tree&filepath=test%2Ftest_big_uints.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-dGVzdC90ZXN0X2JpZ191aW50cy5jcHA=) | `100.0% <100.0%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/cppalliance/decimal/pull/660?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/cppalliance/decimal/pull/660?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Last update [556a5d2...0424598](https://app.codecov.io/gh/cppalliance/decimal/pull/660?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance).