lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] odd/string_db5 bfe789a 1/3: Cache class lingo


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/string_db5 bfe789a 1/3: Cache class lingo
Date: Sun, 6 Dec 2020 20:09:22 -0500 (EST)

branch: odd/string_db5
commit bfe789a73db2350b1433dfe1793f374383740335
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Cache class lingo
---
 Speed_gcc_i686-w64-mingw32    | 12 ++++++------
 Speed_gcc_x86_64-pc-linux-gnu | 12 ++++++------
 Speed_gcc_x86_64-w64-mingw32  | 12 ++++++------
 ihs_basicval.cpp              |  2 +-
 lingo.hpp                     |  2 ++
 5 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/Speed_gcc_i686-w64-mingw32 b/Speed_gcc_i686-w64-mingw32
index 01d157a..b34a40b 100644
--- a/Speed_gcc_i686-w64-mingw32
+++ b/Speed_gcc_i686-w64-mingw32
@@ -1,7 +1,7 @@
 Test speed:
-  naic, no solve      : 5.658e-02 s mean;      56178 us least of  18 runs
-  naic, specamt solve : 9.690e-02 s mean;      96624 us least of  11 runs
-  naic, ee prem solve : 8.935e-02 s mean;      89136 us least of  12 runs
-  finra, no solve     : 2.616e-02 s mean;      26021 us least of  39 runs
-  finra, specamt solve: 6.336e-02 s mean;      63044 us least of  16 runs
-  finra, ee prem solve: 5.920e-02 s mean;      58809 us least of  17 runs
+  naic, no solve      : 5.248e-02 s mean;      52374 us least of  20 runs
+  naic, specamt solve : 9.298e-02 s mean;      92736 us least of  11 runs
+  naic, ee prem solve : 8.541e-02 s mean;      85211 us least of  12 runs
+  finra, no solve     : 2.237e-02 s mean;      22120 us least of  45 runs
+  finra, specamt solve: 5.938e-02 s mean;      59126 us least of  17 runs
+  finra, ee prem solve: 5.520e-02 s mean;      55072 us least of  19 runs
diff --git a/Speed_gcc_x86_64-pc-linux-gnu b/Speed_gcc_x86_64-pc-linux-gnu
index 2cc1406..83a2270 100644
--- a/Speed_gcc_x86_64-pc-linux-gnu
+++ b/Speed_gcc_x86_64-pc-linux-gnu
@@ -1,7 +1,7 @@
 Test speed:
-  naic, no solve      : 2.020e-02 s mean;      19930 us least of  50 runs
-  naic, specamt solve : 3.438e-02 s mean;      33896 us least of  30 runs
-  naic, ee prem solve : 3.169e-02 s mean;      31165 us least of  32 runs
-  finra, no solve     : 8.856e-03 s mean;       8565 us least of 100 runs
-  finra, specamt solve: 2.173e-02 s mean;      20993 us least of  47 runs
-  finra, ee prem solve: 2.045e-02 s mean;      19646 us least of  49 runs
+  naic, no solve      : 1.969e-02 s mean;      18873 us least of  51 runs
+  naic, specamt solve : 3.328e-02 s mean;      32799 us least of  31 runs
+  naic, ee prem solve : 3.046e-02 s mean;      30164 us least of  33 runs
+  finra, no solve     : 7.809e-03 s mean;       7328 us least of 100 runs
+  finra, specamt solve: 2.061e-02 s mean;      19933 us least of  49 runs
+  finra, ee prem solve: 1.937e-02 s mean;      18756 us least of  52 runs
diff --git a/Speed_gcc_x86_64-w64-mingw32 b/Speed_gcc_x86_64-w64-mingw32
index 3bbdb61..708e570 100644
--- a/Speed_gcc_x86_64-w64-mingw32
+++ b/Speed_gcc_x86_64-w64-mingw32
@@ -1,7 +1,7 @@
 Test speed:
-  naic, no solve      : 2.960e-02 s mean;      29448 us least of  34 runs
-  naic, specamt solve : 4.473e-02 s mean;      44543 us least of  23 runs
-  naic, ee prem solve : 4.205e-02 s mean;      41773 us least of  24 runs
-  finra, no solve     : 1.784e-02 s mean;      17712 us least of  57 runs
-  finra, specamt solve: 3.194e-02 s mean;      31680 us least of  32 runs
-  finra, ee prem solve: 3.040e-02 s mean;      30232 us least of  33 runs
+  naic, no solve      : 2.666e-02 s mean;      26496 us least of  38 runs
+  naic, specamt solve : 4.186e-02 s mean;      41651 us least of  24 runs
+  naic, ee prem solve : 3.903e-02 s mean;      38808 us least of  26 runs
+  finra, no solve     : 1.498e-02 s mean;      14804 us least of  67 runs
+  finra, specamt solve: 2.897e-02 s mean;      28771 us least of  35 runs
+  finra, ee prem solve: 2.745e-02 s mean;      27208 us least of  37 runs
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 341efe2..d9a9dee 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -209,7 +209,7 @@ void BasicValues::Init()
             << LMI_FLUSH
             ;
         }
-    lingo_.reset(new lingo(AddDataDir(product().datum("LingoFilename"))));
+    lingo_ = 
lingo::read_via_cache(AddDataDir(product().datum("LingoFilename")));
     FundData_.reset(new FundData(AddDataDir(product().datum("FundFilename"))));
     RoundingRules_.reset
         (new rounding_rules(AddDataDir(product().datum("RoundingFilename")))
diff --git a/lingo.hpp b/lingo.hpp
index 78bcde8..6ecd12d 100644
--- a/lingo.hpp
+++ b/lingo.hpp
@@ -24,6 +24,7 @@
 
 #include "config.hpp"
 
+#include "cache_file_reads.hpp"
 #include "so_attributes.hpp"
 #include "xml_lmi_fwd.hpp"
 
@@ -33,6 +34,7 @@
 /// Company-specific lingo.
 
 class LMI_SO lingo final
+    :public cache_file_reads<lingo>
 {
   public:
     explicit lingo(std::string const& filename);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]