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 dec64 multiplication #655

Closed mborland closed 2 weeks ago

mborland commented 2 weeks ago

Closes: #653

Provides an ~40% speedup to decimal64 by replacing O(log(N)) comparisions with 1

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 (1cd6c70) to head (e57bff0).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cppalliance/decimal/pull/655/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/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ```diff @@ Coverage Diff @@ ## develop #655 +/- ## ========================================= - Coverage 98.5% 98.5% -0.0% ========================================= Files 221 221 Lines 15692 15696 +4 Branches 1724 1723 -1 ========================================= - Hits 15455 15452 -3 - Misses 237 244 +7 ``` | [Files](https://app.codecov.io/gh/cppalliance/decimal/pull/655?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) | Coverage Δ | | |---|---|---| | [include/boost/decimal/detail/emulated256.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/655?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Femulated256.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9lbXVsYXRlZDI1Ni5ocHA=) | `100.0% <100.0%> (ø)` | | | [include/boost/decimal/detail/mul\_impl.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/655?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Fmul_impl.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9tdWxfaW1wbC5ocHA=) | `96.7% <100.0%> (-0.1%)` | :arrow_down: | | [include/boost/decimal/detail/power\_tables.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/655?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Fpower_tables.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9wb3dlcl90YWJsZXMuaHBw) | `100.0% <ø> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/cppalliance/decimal/pull/655/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/cppalliance/decimal/pull/655?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/655?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Last update [1cd6c70...e57bff0](https://app.codecov.io/gh/cppalliance/decimal/pull/655?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).