[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/002 1fbef51 13/14: Make it even faster
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/002 1fbef51 13/14: Make it even faster |
Date: |
Thu, 17 Sep 2020 16:27:16 -0400 (EDT) |
branch: valyuta/002
commit 1fbef5167563c9a24f08a3f2592188412890129b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Make it even faster
$wine ./lmi_cli_shared.exe --accept --data_path=/opt/lmi/data --selftest
Test speed:
naic, no solve : 6.618e-02 s mean; 65698 us least of 16 runs
naic, specamt solve : 1.177e-01 s mean; 117107 us least of 9 runs
naic, ee prem solve : 1.089e-01 s mean; 107848 us least of 10 runs
finra, no solve : 2.400e-02 s mean; 22353 us least of 42 runs
finra, specamt solve: 7.148e-02 s mean; 68895 us least of 15 runs
finra, ee prem solve: 6.582e-02 s mean; 63941 us least of 16 runs
same, but 64-bit:
naic, no solve : 2.744e-02 s mean; 27096 us least of 37 runs
naic, specamt solve : 4.420e-02 s mean; 43700 us least of 23 runs
naic, ee prem solve : 4.180e-02 s mean; 40617 us least of 24 runs
finra, no solve : 1.422e-02 s mean; 13251 us least of 71 runs
finra, specamt solve: 2.908e-02 s mean; 28452 us least of 35 runs
finra, ee prem solve: 2.768e-02 s mean; 27004 us least of 37 runs
This still isn't as fast as 'master' [see 'README.branch.patch' for
recent measurements]; but, taking the third of six scenarios as the
benchmark, the penalty is only
(107848 / 84947) - 1
which is about twenty-seven percent, for 32 bit; or, for 64 bit:
(40617 / 37410) - 1
which is only about nine percent.
And a change from 32-bit master to 64-bit valyuta/002 actually _reduces_
the calculation time by
(40617 / 84947) - 1
about fifty-two percent.
What about accuracy? The full lmi system test [using mostly proprietary
products] doesn't quite run with this commit, but only because of
spurious regressions like this:
4415.97 GrossPmts[Month]
4415.97 EeGrossPmts[Month] + ErGrossPmts[Month]
4000 EeGrossPmts[Month]
415.97 ErGrossPmts[Month]
0 Year
0 Month
[ihs_avmly.cpp : 1294]
Assertion \
'GrossPmts[Month] == EeGrossPmts[Month] + ErGrossPmts[Month]' failed.
But, with the purely superficial changes in the next (throwaway) commit,
the system test succeeds (it exhibits a number of small regressions that
can all be justified).
---
currency.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/currency.hpp b/currency.hpp
index a7ef89b..86c36cf 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -43,7 +43,7 @@
// Similar restrictions apply to these macros, but they'd be tedious
// to write. Use them only with floating-point dollars.
#define MAKE_IT_FASTER
-//#define MAKE_IT_EVEN_FASTER
+#define MAKE_IT_EVEN_FASTER
#if !defined CURRENCY_HAS_INTEGER_DATATYPE
# if defined __GNUC__
- [lmi-commits] [lmi] valyuta/002 53de040 01/14: Add an extra argument to currency(data_type), (continued)
- [lmi-commits] [lmi] valyuta/002 53de040 01/14: Add an extra argument to currency(data_type), Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 c5e0b01 04/14: Make currency class mandatory, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 c80d1eb 09/14: Add two experimental options, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 e4cb0f1 10/14: Make it float, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 cfe336c 11/14: Make it faster, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 4a6bc6c 02/14: Resolve confusion, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 0d47d8d 03/14: Refine an assertion, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 27c198e 05/14: fixup, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 3d1ff11 06/14: Remove useless casts, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 594bd68 07/14: Allow floating currency::data_type, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 1fbef51 13/14: Make it even faster,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/002 420fac7 08/14: Allow currency to be dollars rather than cents, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 3f71218 14/14: Trivially avoid spurious regression errors, Greg Chicares, 2020/09/17
- [lmi-commits] [lmi] valyuta/002 e262406 12/14: Make it more faster, Greg Chicares, 2020/09/17