[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/004 92f8e2d 1/4: Begin to improve rounding
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/004 92f8e2d 1/4: Begin to improve rounding |
Date: |
Fri, 18 Dec 2020 07:29:52 -0500 (EST) |
branch: valyuta/004
commit 92f8e2d40c042a62015103efb64c8d8ae5eb1273
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Begin to improve rounding
As a first step, enabled an assertion that had been suppressed,
apparently under the assumption, here disproved, that it was costly.
---
Speed_gcc_i686-w64-mingw32 | 12 ++++++------
round_to.hpp | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Speed_gcc_i686-w64-mingw32 b/Speed_gcc_i686-w64-mingw32
index a49b772..ec9d7ad 100644
--- a/Speed_gcc_i686-w64-mingw32
+++ b/Speed_gcc_i686-w64-mingw32
@@ -1,7 +1,7 @@
Test speed:
- naic, no solve : 6.381e-02 s mean; 61566 us least of 16 runs
- naic, specamt solve : 1.125e-01 s mean; 108587 us least of 10 runs
- naic, ee prem solve : 1.027e-01 s mean; 100152 us least of 10 runs
- finra, no solve : 2.356e-02 s mean; 23123 us least of 43 runs
- finra, specamt solve: 6.661e-02 s mean; 66019 us least of 16 runs
- finra, ee prem solve: 6.188e-02 s mean; 61275 us least of 17 runs
+ naic, no solve : 6.199e-02 s mean; 61318 us least of 17 runs
+ naic, specamt solve : 1.093e-01 s mean; 108222 us least of 10 runs
+ naic, ee prem solve : 1.001e-01 s mean; 99517 us least of 10 runs
+ finra, no solve : 2.358e-02 s mean; 23235 us least of 43 runs
+ finra, specamt solve: 6.669e-02 s mean; 65938 us least of 15 runs
+ finra, ee prem solve: 6.192e-02 s mean; 61419 us least of 17 runs
diff --git a/round_to.hpp b/round_to.hpp
index 26c4ac9..443fdcb 100644
--- a/round_to.hpp
+++ b/round_to.hpp
@@ -437,7 +437,7 @@ inline std::vector<currency>
round_to<RealType>::c(std::vector<RealType> r) cons
template<typename RealType>
inline currency round_to<RealType>::c(currency z) const
{
-// LMI_ASSERT(decimals() <= 2); // ROUNDING similarly restrict rounding_rules
+ LMI_ASSERT(decimals() <= 2); // ROUNDING similarly restrict rounding_rules
// instead, this ought to verify proper rounding
return z;
}