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 multiplication for decimal128_fast #662

Closed mborland closed 2 weeks ago

mborland commented 2 weeks ago

Closes: #659

Provides a 22% speedup over develop. Likely still could be better.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.3%. Comparing base (cee3df5) to head (c011208).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cppalliance/decimal/pull/662/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/662?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ```diff @@ Coverage Diff @@ ## develop #662 +/- ## ========================================= - Coverage 98.5% 98.3% -0.2% ========================================= Files 223 223 Lines 16048 16112 +64 Branches 1774 1776 +2 ========================================= + Hits 15807 15824 +17 - Misses 241 288 +47 ``` | [Files](https://app.codecov.io/gh/cppalliance/decimal/pull/662?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/decimal128\_fast.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdecimal128_fast.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RlY2ltYWwxMjhfZmFzdC5ocHA=) | `94.7% <100.0%> (-2.2%)` | :arrow_down: | | [...ude/boost/decimal/detail/cmath/impl/expm1\_impl.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Fcmath%2Fimpl%2Fexpm1_impl.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9jbWF0aC9pbXBsL2V4cG0xX2ltcGwuaHBw) | `100.0% <ø> (ø)` | | | [...de/boost/decimal/detail/cmath/impl/lgamma\_impl.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Fcmath%2Fimpl%2Flgamma_impl.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9jbWF0aC9pbXBsL2xnYW1tYV9pbXBsLmhwcA==) | `100.0% <ø> (ø)` | | | [...ude/boost/decimal/detail/cmath/impl/log1p\_impl.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Fcmath%2Fimpl%2Flog1p_impl.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9jbWF0aC9pbXBsL2xvZzFwX2ltcGwuaHBw) | `100.0% <ø> (ø)` | | | [...lude/boost/decimal/detail/cmath/impl/tanh\_impl.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Fcmath%2Fimpl%2Ftanh_impl.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9jbWF0aC9pbXBsL3RhbmhfaW1wbC5ocHA=) | `100.0% <ø> (ø)` | | | [include/boost/decimal/detail/power\_tables.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?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% <100.0%> (ø)` | | | [test/random\_decimal128\_fast\_math.cpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?src=pr&el=tree&filepath=test%2Frandom_decimal128_fast_math.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-dGVzdC9yYW5kb21fZGVjaW1hbDEyOF9mYXN0X21hdGguY3Bw) | `100.0% <100.0%> (ø)` | | | [test/test\_beta.cpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?src=pr&el=tree&filepath=test%2Ftest_beta.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-dGVzdC90ZXN0X2JldGEuY3Bw) | `100.0% <100.0%> (ø)` | | | [include/boost/decimal/detail/mul\_impl.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/662?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=) | `95.0% <90.0%> (-1.6%)` | :arrow_down: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/cppalliance/decimal/pull/662/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/662?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/662?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Last update [cee3df5...c011208](https://app.codecov.io/gh/cppalliance/decimal/pull/662?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).