[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master a5d93f8 2/2: Refactor
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master a5d93f8 2/2: Refactor |
Date: |
Wed, 2 Dec 2020 11:39:57 -0500 (EST) |
branch: master
commit a5d93f880cae331c466c3618476b5b5d83e186bf
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Refactor
Stored some drop-in text as variables, because variables are readily
moved into '.lingo' files.
---
Speed_gcc_i686-w64-mingw32 | 12 ++--
Speed_gcc_x86_64-pc-linux-gnu | 12 ++--
Speed_gcc_x86_64-w64-mingw32 | 12 ++--
product_data.cpp | 155 +++++++++++++++++++++---------------------
4 files changed, 96 insertions(+), 95 deletions(-)
diff --git a/Speed_gcc_i686-w64-mingw32 b/Speed_gcc_i686-w64-mingw32
index cde08ec..fd85dcb 100644
--- a/Speed_gcc_i686-w64-mingw32
+++ b/Speed_gcc_i686-w64-mingw32
@@ -1,7 +1,7 @@
Test speed:
- naic, no solve : 5.230e-02 s mean; 52006 us least of 20 runs
- naic, specamt solve : 9.289e-02 s mean; 92267 us least of 11 runs
- naic, ee prem solve : 8.522e-02 s mean; 84911 us least of 12 runs
- finra, no solve : 2.203e-02 s mean; 21735 us least of 46 runs
- finra, specamt solve: 5.923e-02 s mean; 59036 us least of 17 runs
- finra, ee prem solve: 5.509e-02 s mean; 54919 us least of 19 runs
+ naic, no solve : 5.311e-02 s mean; 52555 us least of 19 runs
+ naic, specamt solve : 9.435e-02 s mean; 93437 us least of 11 runs
+ naic, ee prem solve : 8.679e-02 s mean; 85998 us least of 12 runs
+ finra, no solve : 2.279e-02 s mean; 21936 us least of 44 runs
+ finra, specamt solve: 6.012e-02 s mean; 59489 us least of 17 runs
+ finra, ee prem solve: 5.617e-02 s mean; 55311 us least of 18 runs
diff --git a/Speed_gcc_x86_64-pc-linux-gnu b/Speed_gcc_x86_64-pc-linux-gnu
index 9db64ad..a9ab93f 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 : 1.970e-02 s mean; 18965 us least of 51 runs
- naic, specamt solve : 3.330e-02 s mean; 32647 us least of 31 runs
- naic, ee prem solve : 3.066e-02 s mean; 30007 us least of 33 runs
- finra, no solve : 7.952e-03 s mean; 7718 us least of 100 runs
- finra, specamt solve: 2.085e-02 s mean; 20213 us least of 48 runs
- finra, ee prem solve: 1.947e-02 s mean; 18808 us least of 52 runs
+ naic, no solve : 1.958e-02 s mean; 18925 us least of 52 runs
+ naic, specamt solve : 3.361e-02 s mean; 32906 us least of 30 runs
+ naic, ee prem solve : 3.062e-02 s mean; 30085 us least of 33 runs
+ finra, no solve : 7.762e-03 s mean; 7435 us least of 100 runs
+ finra, specamt solve: 2.116e-02 s mean; 20391 us least of 48 runs
+ finra, ee prem solve: 1.950e-02 s mean; 18999 us least of 52 runs
diff --git a/Speed_gcc_x86_64-w64-mingw32 b/Speed_gcc_x86_64-w64-mingw32
index d81dbb9..7f6a55c 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.687e-02 s mean; 26618 us least of 38 runs
- naic, specamt solve : 4.202e-02 s mean; 41770 us least of 24 runs
- naic, ee prem solve : 3.920e-02 s mean; 38984 us least of 26 runs
- finra, no solve : 1.497e-02 s mean; 14829 us least of 67 runs
- finra, specamt solve: 2.905e-02 s mean; 28797 us least of 35 runs
- finra, ee prem solve: 2.746e-02 s mean; 27293 us least of 37 runs
+ naic, no solve : 2.803e-02 s mean; 26772 us least of 36 runs
+ naic, specamt solve : 4.250e-02 s mean; 41871 us least of 24 runs
+ naic, ee prem solve : 4.117e-02 s mean; 39130 us least of 25 runs
+ finra, no solve : 1.497e-02 s mean; 14659 us least of 67 runs
+ finra, specamt solve: 2.927e-02 s mean; 28802 us least of 35 runs
+ finra, ee prem solve: 2.788e-02 s mean; 27340 us least of 36 runs
diff --git a/product_data.cpp b/product_data.cpp
index 51bc642..2c86472 100644
--- a/product_data.cpp
+++ b/product_data.cpp
@@ -832,6 +832,80 @@ sample2gpp::sample2gpp()
item("DatabaseFilename") = glossed_string("sample2gpp.database");
}
+static std::string const S_Poe0 =
+ "The \"Red Death\" had long devastated the country. No pestilence"
+ " had ever been so fatal, or so hideous. Blood was its Avatar and"
+ " its seal--the redness and the horror of blood. There were sharp"
+ " pains, and sudden dizziness, and then profuse bleeding at the"
+ " pores, with dissolution. The scarlet stains upon the body and"
+ " especially upon the face of the victim, were the pest ban which"
+ " shut him out from the aid and from the sympathy of his fellow-men."
+ " And the whole seizure, progress and termination of the disease,"
+ " were the incidents of half an hour.";
+static std::string const S_Poe1 =
+ "But the Prince Prospero was happy and dauntless and sagacious. When"
+ " his dominions were half depopulated, he summoned to his presence a"
+ " thousand hale and light-hearted friends from among the knights and"
+ " dames of his court, and with these retired to the deep seclusion"
+ " of one of his castellated abbeys. This was an extensive and"
+ " magnificent structure, the creation of the prince's own eccentric"
+ " yet august taste. A strong and lofty wall girdled it in. This wall"
+ " had gates of iron. The courtiers, having entered, brought furnaces"
+ " and massy hammers and welded the bolts. They resolved to leave"
+ " means neither of ingress nor egress to the sudden impulses of"
+ " despair or of frenzy from within. The abbey was amply provisioned."
+ " With such precautions the courtiers might bid defiance to contagion."
+ " The external world could take care of itself. In the meantime it"
+ " was folly to grieve, or to think. The prince had provided all the"
+ " appliances of pleasure. There were buffoons, there were"
+ " improvisatori, there were ballet-dancers, there were musicians,"
+ " there was Beauty, there was wine. All these and security were"
+ " within. Without was the \"Red Death\".";
+static std::string const S_Poe2 =
+ "It was towards the close of the fifth or sixth month of his"
+ " seclusion, and while the pestilence raged most furiously abroad,"
+ " that the Prince Prospero entertained his thousand friends at a"
+ " masked ball of the most unusual magnificence.";
+static std::string const S_Poe3 =
+ "It was a voluptuous scene, that masquerade. But first let me tell"
+ " of the rooms in which it was held. These were seven--an imperial"
+ " suite. In many palaces, however, such suites form a long and"
+ " straight vista, while the folding doors slide back nearly to the"
+ " walls on either hand, so that the view of the whole extent is"
+ " scarcely impeded. Here the case was very different, as might have"
+ " been expected from the duke's love of the _bizarre_. The apartments"
+ " were so irregularly disposed that the vision embraced but little"
+ " more than one at a time. There was a sharp turn at every twenty or"
+ " thirty yards, and at each turn a novel effect. To the right and"
+ " left, in the middle of each wall, a tall and narrow Gothic window"
+ " looked out upon a closed corridor which pursued the windings of the"
+ " suite. These windows were of stained glass whose color varied in"
+ " accordance with the prevailing hue of the decorations of the"
+ " chamber into which it opened. That at the eastern extremity was"
+ " hung, for example in blue--and vividly blue were its windows. The"
+ " second chamber was purple in its ornaments and tapestries, and here"
+ " the panes were purple. The third was green throughout, and so were"
+ " the casements. The fourth was furnished and lighted with orange--the"
+ " fifth with white--the sixth with violet. The seventh apartment was"
+ " closely shrouded in black velvet tapestries that hung all over the"
+ " ceiling and down the walls, falling in heavy folds upon a carpet of"
+ " the same material and hue. But in this chamber only, the color of"
+ " the windows failed to correspond with the decorations. The panes"
+ " here were scarlet--a deep blood color. Now in no one of the seven"
+ " apartments was there any lamp or candelabrum, amid the profusion of"
+ " golden ornaments that lay scattered to and fro or depended from the"
+ " roof. There was no light of any kind emanating from lamp or candle"
+ " within the suite of chambers. But in the corridors that followed the"
+ " suite, there stood, opposite to each window, a heavy tripod, bearing"
+ " a brazier of fire, that projected its rays through the tinted glass"
+ " and so glaringly illumined the room. And thus were produced a"
+ " multitude of gaudy and fantastic appearances. But in the western or"
+ " black chamber the effect of the fire-light that streamed upon the"
+ " dark hangings through the blood-tinted panes, was ghastly in the"
+ " extreme, and produced so wild a look upon the countenances of those"
+ " who entered, that there were few of the company bold enough to set"
+ " foot within its precincts at all.";
+
/// This specimen product
/// https://lists.nongnu.org/archive/html/lmi/2018-09/msg00039.html
/// | has deliberately overlong footnotes
@@ -840,83 +914,10 @@ sample2gpp::sample2gpp()
sample2ipp::sample2ipp()
{
item("DatabaseFilename") = glossed_string("sample2ipp.database");
- item("IrrDbFootnote") = glossed_string
- ("The \"Red Death\" had long devastated the country. No pestilence"
- " had ever been so fatal, or so hideous. Blood was its Avatar and"
- " its seal--the redness and the horror of blood. There were sharp"
- " pains, and sudden dizziness, and then profuse bleeding at the"
- " pores, with dissolution. The scarlet stains upon the body and"
- " especially upon the face of the victim, were the pest ban which"
- " shut him out from the aid and from the sympathy of his fellow-men."
- " And the whole seizure, progress and termination of the disease,"
- " were the incidents of half an hour."
- );
- item("IrrCsvFootnote") = glossed_string
- ("But the Prince Prospero was happy and dauntless and sagacious. When"
- " his dominions were half depopulated, he summoned to his presence a"
- " thousand hale and light-hearted friends from among the knights and"
- " dames of his court, and with these retired to the deep seclusion"
- " of one of his castellated abbeys. This was an extensive and"
- " magnificent structure, the creation of the prince's own eccentric"
- " yet august taste. A strong and lofty wall girdled it in. This wall"
- " had gates of iron. The courtiers, having entered, brought furnaces"
- " and massy hammers and welded the bolts. They resolved to leave"
- " means neither of ingress nor egress to the sudden impulses of"
- " despair or of frenzy from within. The abbey was amply provisioned."
- " With such precautions the courtiers might bid defiance to
contagion."
- " The external world could take care of itself. In the meantime it"
- " was folly to grieve, or to think. The prince had provided all the"
- " appliances of pleasure. There were buffoons, there were"
- " improvisatori, there were ballet-dancers, there were musicians,"
- " there was Beauty, there was wine. All these and security were"
- " within. Without was the \"Red Death\"."
- );
- item("MortalityChargesFootnote") = glossed_string
- ("It was towards the close of the fifth or sixth month of his"
- " seclusion, and while the pestilence raged most furiously abroad,"
- " that the Prince Prospero entertained his thousand friends at a"
- " masked ball of the most unusual magnificence."
- );
- item("PolicyYearFootnote") = glossed_string
- ("It was a voluptuous scene, that masquerade. But first let me tell"
- " of the rooms in which it was held. These were seven--an imperial"
- " suite. In many palaces, however, such suites form a long and"
- " straight vista, while the folding doors slide back nearly to the"
- " walls on either hand, so that the view of the whole extent is"
- " scarcely impeded. Here the case was very different, as might have"
- " been expected from the duke's love of the _bizarre_. The apartments"
- " were so irregularly disposed that the vision embraced but little"
- " more than one at a time. There was a sharp turn at every twenty or"
- " thirty yards, and at each turn a novel effect. To the right and"
- " left, in the middle of each wall, a tall and narrow Gothic window"
- " looked out upon a closed corridor which pursued the windings of the"
- " suite. These windows were of stained glass whose color varied in"
- " accordance with the prevailing hue of the decorations of the"
- " chamber into which it opened. That at the eastern extremity was"
- " hung, for example in blue--and vividly blue were its windows. The"
- " second chamber was purple in its ornaments and tapestries, and here"
- " the panes were purple. The third was green throughout, and so were"
- " the casements. The fourth was furnished and lighted with
orange--the"
- " fifth with white--the sixth with violet. The seventh apartment was"
- " closely shrouded in black velvet tapestries that hung all over the"
- " ceiling and down the walls, falling in heavy folds upon a carpet of"
- " the same material and hue. But in this chamber only, the color of"
- " the windows failed to correspond with the decorations. The panes"
- " here were scarlet--a deep blood color. Now in no one of the seven"
- " apartments was there any lamp or candelabrum, amid the profusion of"
- " golden ornaments that lay scattered to and fro or depended from the"
- " roof. There was no light of any kind emanating from lamp or candle"
- " within the suite of chambers. But in the corridors that followed
the"
- " suite, there stood, opposite to each window, a heavy tripod,
bearing"
- " a brazier of fire, that projected its rays through the tinted glass"
- " and so glaringly illumined the room. And thus were produced a"
- " multitude of gaudy and fantastic appearances. But in the western or"
- " black chamber the effect of the fire-light that streamed upon the"
- " dark hangings through the blood-tinted panes, was ghastly in the"
- " extreme, and produced so wild a look upon the countenances of those"
- " who entered, that there were few of the company bold enough to set"
- " foot within its precincts at all."
- );
+ item("IrrDbFootnote") = S_Poe0;
+ item("IrrCsvFootnote") = S_Poe1;
+ item("MortalityChargesFootnote") = S_Poe2;
+ item("PolicyYearFootnote") = S_Poe3;
}
sample2xyz::sample2xyz()