View Issue Details

IDProjectCategoryView StatusLast Update
0029399Open CASCADEOCCT:Foundation Classespublic2020-10-09 10:51
ReporterabvAssigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029399: Optimize reading of floating point values from text strings
DescriptionDE module of OCCT uses its own function for reading floating point values from text strings, Interface_FileReaderData::Fastof(), which is made to be faster (2-5 times) than functions provided by standard library (strtod() or atof()).

The acceleration is due to simpler implementation, which does not support locale (thousands separators, custom symbol for radix etc.) and less precise calculations that may yield result different in 16-th digit.

It would be reasonable to use similar accelerated function in other places where numbers are read from strings, e.g. in reading BREP files. For that it seems to be sufficient to reimplement function Strtod() (which now calls standard strtod() with locale fixed to be standard C locale).
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberperf draw restore, perf fclasses strtod

Attached Files

  • strtod_benchmark.xlsx (33,807 bytes)
  • Standard_Strtod_adhoc.zip (16,527 bytes)

Relationships

related to 0025170 closedabv Community STEP Reader - files with double points in float values can't be properly imported 

Activities

git

2017-12-25 21:18

administrator   ~0073128

Branch CR29399 has been created by abv.

SHA-1: 6992ed479f5bffdc993581f6ab6a21ba958c7dfe


Detailed log of new commits:

Author: abv
Date: Sun Dec 24 09:44:04 2017 +0300

    0029399: Optimize reading of floating point values from text strings
    
    Function Strtod() is reimplemented using custom code to provide better prformance (3-10 times faster) than standard strtod(), on expense of possibility to have error in 16-th digit (up to 2 epsilon).
    
    Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.

abv

2018-01-02 16:01

manager   ~0073221

Regressions on Windows:

Failed
3rdparty export A2 A3 A4 A5 A6 A7
bugs fclasses buc60727 bug9848_1 bug9848_2 bug11568_1 bug11568_2 bug11568_3 bug11568_4
bugs mesh bug26372
bugs modalg_2 bug22804
bugs modalg_5 bug23706_17 bug23706_19 bug23706_20 bug23706_22 bug23706_24 bug24347
bugs modalg_6 bug25613_2 bug26576_3 bug26896_1 bug26896_2 bug27263
bugs modalg_7 bug27390_1 bug27390_2 bug29293_1 bug29293_2
bugs moddata_3 bug24068 bug26038_2
bugs vis buc60632_1 buc60632_2 buc60915 bug10 bug218 bug301 bug21091_3 bug21091_4 bug21091_5 bug21091_6 bug21091_7 bug21091_8 bug21091_9 bug24133_1 bug24133_2 bug24133_3 bug24133_4 bug24288_1 bug24288_2 bug24288_3 bug24293 bug24351_1 bug24351_2 bug24351_3 bug24351_4 bug24374 bug24389 bug24412_1 bug24412_2 bug25403 bug25549_1 bug25549_2 bug26035_1 bug26035_3 bug26035_4 bug26035_5 bug26035_6 bug26056 bug26317 bug27688 bug27692 bug28099_text_core
bugs xde bug23193
caf basic N2
de step_1 A3
de step_3 E6
de_mesh stl_read A1 A5 A9 A13 C1 C4 C6 C8 C12
demo samples dimensions dimensionsglsl snowflake
heal split_angle_advanced ZD1
mesh standard_shading W7
offset simple A07 A14
offset wire_closed_inside_0_005 D1 E8
offset wire_closed_inside_0_025 E8
offset wire_closed_inside_0_075 E8
offset wire_closed_outside_0_005 E8
offset wire_closed_outside_0_025 E8
offset wire_closed_outside_0_075 E8
offset wire_unclosed_outside_0_005 A9 B6
offset wire_unclosed_outside_0_075 A9
v3d dimensions angle180 lengthparam lengthparam_flyout_reversed lengthparam_reversed lengthparam_reversed_direction lengthparam_reversed_flyout_reversed
v3d point_cloud sphere
Improvements
bugs modalg_6 bug26152_1 bug26152_2
de step_2 G6
offset with_intersect_80 L9

Regressions on Linux:

Failed
3rdparty export A1 A2 A3 A4 A5 A6 A7
bugs fclasses buc60727 bug9848_1 bug9848_2 bug11568_1 bug11568_2 bug11568_3 bug11568_4 bug26922
bugs modalg_7 bug29293_1 bug29293_2
bugs vis buc60632_1 buc60632_2 buc60915 bug10 bug218 bug301 bug21091_3 bug21091_4 bug21091_5 bug21091_6 bug21091_7 bug21091_8 bug21091_9 bug24133_1 bug24133_2 bug24133_3 bug24133_4 bug24288_1 bug24288_2 bug24288_3 bug24293 bug24351_1 bug24351_2 bug24351_3 bug24351_4 bug24374 bug24389 bug24412_1 bug24412_2 bug25403 bug25549_1 bug25549_2 bug26035_1 bug26035_3 bug26035_4 bug26035_5 bug26035_6 bug26056 bug26317 bug27688 bug27692 bug28099_text_core
bugs xde bug23193
de step_1 A3
de step_3 E6
de_mesh stl_read A1 A5 A9 A13 C1 C4 C6 C8 C12
demo draw binpersist_2
demo samples dimensions dimensionsglsl snowflake
perf fclasses strtod
v3d dimensions angle180 lengthparam lengthparam_flyout_reversed lengthparam_reversed lengthparam_reversed_direction lengthparam_reversed_flyout_reversed
v3d point_cloud sphere

abv

2018-01-02 16:04

manager   ~0073222

Some of the above listed regressions are due to bug (single period "." was treated as valid real number, which led to misbehavior of Units package, and resulting in access violations), but most are due to not very accurate conversion (error in 16-th digit). That is, we need more accurate implementation.

git

2018-01-02 17:57

administrator   ~0073223

Branch CR29399_1 has been created by abv.

SHA-1: 6d5342bbeb6b4a65208ba44d1d78fd5c81c2358a


Detailed log of new commits:

Author: abv
Date: Sun Dec 24 09:44:04 2017 +0300

    0029399: Optimize reading of floating point values from text strings
    
    Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves performance by 3-10 times.
    
    Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.
    
    DRAW command QATestAtof and test perf fclasses strtod are added to control correctness and performance of strtod.

git

2018-01-02 20:50

administrator   ~0073224

Branch CR29399_1 has been updated forcibly by abv.

SHA-1: 55aa72617570c2ebe0578115a6ace1c38022c22e

git

2018-01-02 23:36

administrator   ~0073225

Branch CR29399_1 has been updated forcibly by abv.

SHA-1: 4cf44b409faa661219f38c3ff6ba2fa2e738f005

git

2018-01-02 23:53

administrator   ~0073226

Branch CR29399_1 has been updated forcibly by abv.

SHA-1: 6d9f7bbebddf4e2137d7c248d0be6516907ac9d4

abv

2018-01-04 10:08

manager   ~0073229

The result of replacement of standard strtod() by implementation of David M. Gay is improvement of performance of reading large BREP and Ascii STL files.

The following times are measured in DRAW (MSVC 2010 64-bit, i7-4790 CPU):

File | Size | CPU OCCT 7.2.0 | CPU CR29399_2
----------------------------------------------------------------
bug28871_50056.brep | 68 MB | 3.7 sec | 2.7 sec
OCC22759-weldt6.brep| 36 MB | 1.25 sec | 0.64 sec
AR_s1_clean.stla | 4681 MB | 118 sec | 61 sec

git

2018-01-04 10:25

administrator   ~0073230

Branch CR29399_1 has been updated forcibly by abv.

SHA-1: 938b975f4a3e566060523714e856d7839d17405b

abv

2018-01-04 22:58

manager   ~0073231

Fix is pushed to branch CR29399_1, please review. The results of non-regression tests are in Jenkins job CR29399-master-abv. The results of manual tests of performance are given in 0029399:0073229.

abv

2018-01-04 23:31

manager  

strtod_benchmark.xlsx (33,807 bytes)

abv

2018-01-04 23:31

manager  

Standard_Strtod_adhoc.zip (16,527 bytes)

abv

2018-01-04 23:37

manager   ~0073232

Last edited: 2018-01-04 23:38

Attached Excel file (strtod_benchmark.xlsx) contains results of testing of several implementations of strtod(). The one marked as "david" is use in the patch CR29399_1, as it is quite fast yet accurate. The ad-hoc implementation that I tried to build on my own (faster than david, but can give error in 16-th digit up to 2 epsilon) is attached in archive Standard_Strtod_adhoc.zip. In addition, the same archive contains a more precise version that uses 80-bytes floats and seems to be at the same level of accuracy as david, but slower.

The tests that show failures or improvements with ad-hoc implementation (i.e. deviations caused by difference in 16-digit) are (Windows 10 64-bit, MSVC 2010):

bugs mesh bug26372
bugs modalg_2 bug22804
bugs modalg_5 bug23706_17 bug23706_19 bug23706_20 bug23706_22 bug23706_24 bug24347
bugs modalg_6 bug25613_2 bug26576_3 bug26896_1 bug26896_2 bug27021 bug27263
bugs modalg_7 bug27390_1 bug27390_2
bugs moddata_3 bug24068 bug26038_2
caf basic N2
de step_3 E6
heal split_angle_advanced ZD1
mesh standard_shading W7
offset simple A07 A14
offset wire_closed_inside_0_005 D1 E8
offset wire_closed_inside_0_025 E8
offset wire_closed_inside_0_075 E8
offset wire_closed_outside_0_005 E8
offset wire_closed_outside_0_025 E8
offset wire_closed_outside_0_075 E8
offset wire_unclosed_outside_0_005 A9 B6
offset wire_unclosed_outside_0_075 A9

Improvements
bugs modalg_6 bug26152_1 bug26152_2
de step_2 G6

git

2018-01-06 22:01

administrator   ~0073235

Branch CR29399_1 has been updated by abv.

SHA-1: 91052427c5f2830a748944334b6296dc9566a73a


Detailed log of new commits:

Author: abv
Date: Sat Jan 6 22:01:09 2018 +0300

    Functions Atof(), Strtod(), Printf(), Sprintf(), Fprintf() are declared as extern "C" to be usable from C programs.

abv

2018-01-07 14:20

manager   ~0073239

I have added new Strtod() in Products, please review. Test results are in the same Jenkins job CR29399-master-abv

kgv

2018-01-07 16:37

developer   ~0073242

+#if defined(_MSC_VER) && _MSC_VER < 1700
+      // MSVC < 2010 prints nan and inf as 1.#NAN or 1.INF, and noes not recognize nan or inf on read

MSVC <= 2010 ?

+static int check_atof (const NCollection_Array2<char>& theStrings, const char* theFormat,
+                       double (*test_func)(const char*), Draw_Interpretor& di)
+{
...
+    sprintf (buff, theFormat, aVal);

Wouldn't using sprintf instead of Sprintf lead to test failure in case of bad system locale?

kgv

2018-01-07 17:13

developer   ~0073243

+    if (strcasecmp (buff, &theStrings(i,0)))

strcasecmp() does not return a bool, using it like this in if statement is confusing.

+      if (aNbErr < 5)
+      {
+        char aBuff[256];
+        sprintf (aBuff, "Deviation parsing %s and print back: %s\n", aStr, buff);
+        di << aBuff;

Is there any reason for using sprintf instead of direct output to di?

+  NCollection_Array2<char> aValuesStr (0, aNbToTest, 0, MAXLEN);

aNbToTest-1 ?

+static bool ReadVertex (const char* theStr, double& theX, double& theY, double& theZ)
...
+  // skip 'vertex'
+  while (isspace ((unsigned char)*aStr) || isalpha ((unsigned char)*aStr)) 
+    ++aStr;
...
+  return aEnd != aStr;

These checks are wrong (incomplete - keyword is not checked, presence of 3 float values is not checked), which might allow reading a messed up/non STL file without warnings.

+void Standard_GUID::Assign (const Standard_UUID& theUUID) 

The change is not mentioned in the commit description (and probably unrelated to the bug).

Standard_Strtod.cxx
...
+ This code has been downloaded from  http://www.netlib.org/fp/ on 2017-12-16 
+ and adapted for use within Open CASCADE Technology as follows:

It might be useful pushing original code and modifications to it as separate commits, preserved during integration to master (just a suggestion).

+//! Returns 32-bit hash code for the first theLen charcters in the string theStr 
+__Standard_API Standard_Integer HashCodes (const Standard_CString theStr, const Standard_Integer theLen);
+
+//! Returns bounded hash code for the first theLen charcters in 
+//! the string theStr, in range [1, theUpper]

charcters

kgv

2018-01-07 18:45

developer   ~0073244

-    float anIntensity;
+    double aIntensity = Strtod (aEnd3, &aEnd4);

anIntensity

+    if (*aStr++ == 'v' && isspace((unsigned char)*aStr++))

Two increments on the same line are very confusing.

git

2018-01-07 21:20

administrator   ~0073245

Branch CR29399_1 has been updated by abv.

SHA-1: a65440260e906c0a106b09921b07e04bed3e7cdc


Detailed log of new commits:

Author: abv
Date: Sun Jan 7 21:20:04 2018 +0300

    # review remarks

abv

2018-01-07 21:21

manager   ~0073247

Remarks are taken into account except a few:

> strcasecmp() does not return a bool, using it like this in if statement is confusing.

- using integer value in if() statements are fully compliant with C and C++ language specifications -- these values are implicitly converted to bool, see http://en.cppreference.com/w/cpp/language/implicit_conversion section "Boolean conversions". Thus I see nothing confusing here.

> These checks are wrong (incomplete - keyword is not checked, presence of 3 float values is not checked), which might allow reading a messed up/non STL file without warnings.

- it was the same before the fix for CR29399. Absence of check for "vertex" is intentional relaxation of the reader - both for better performance and for possibility to read files with "vetrex" word being written in different case or otherwise differently. The STL format is not strictly defined and thus its syntax is controlled only partially - only keywords "facet", "outer", "solid" and "endsolid" are checked. For the facet definition, we rely on assumption that it has 3 lines, each contains some word followed by at least 3 real values. If this is not satisfied, error will be reported. You can improve this logic if you find it necessary.

> The change is not mentioned in the commit description (and probably unrelated to the bug).

- Yep, because this is minor change, not affecting anything and assumingly not interesting for anybody in practice.

> It might be useful pushing original code and modifications to it as separate commits, preserved during integration to master (just a suggestion).

- I see no reason in doing that; link to original source and thorough description of changes both provide a way for anyone to recover original version

> Two increments on the same line are very confusing.

- Here efficiency and clarity of the code take precedence over possibility to confuse someone (but who can be confused by plain C code?)

kgv

2018-01-07 21:57

developer   ~0073248

Last edited: 2018-01-08 01:20

>> strcasecmp() does not return a bool,
>> using it like this in if statement is confusing.
>- using integer value in if() statements are fully compliant
> with C and C++ language specifications
I wouldn't mention about something not complying standard, because this would usually emit compiler error or warning - this is more about coding style.
The same is for removing comparison with NULL.

>> These checks are wrong (incomplete - keyword is not checked,
>> presence of 3 float values is not checked),
>> which might allow reading a messed up/non STL file without warnings.
> - it was the same before the fix for CR29399.
Considering case insensitive check - such improvement should be done in dedicated patch, and relaxation within current patch is irrelevant, because other keywords are expected lower-cased. I have seen only once such files, where ALL keywords were all uppercased (not mixed).

> - Yep, because this is minor change,
> not affecting anything and assumingly not interesting for anybody in practice.
Then please drop it from this patch - it is unrelated.

> - I see no reason in doing that;
> link to original source and thorough description
> of changes both provide a way for anyone to recover original version
You are assuming two things:
1) External URL being available forever.
2) The original file will not receive new fixes.
While the second might be near to the true (e.g. original project will not receive any improvements / bug-fixes), the first one cannot be guaranteed and at some point can be lost.

kgv

2018-01-07 22:04

developer   ~0073249

+      // MSVC < 2015 prints nan and inf as 1.#NAN or 1.INF, and noes not recognize nan or inf on read

noes.

 936   sprintf (aFormat, "%%.%dlg", Max (2, Min (20, aNbDigits)));
...
 949       double aVal = aRandomDistr (aRandomEngine);
 950       sprintf(&aValuesStr(i,0), aFormat, aVal);
...
1004       sprintf(&aValuesStr(i,0), aFormat, aVal.valdbl);

Shouldn't be Sprintf used here as well?

git

2018-01-08 10:53

administrator   ~0073251

Branch CR29399_1 has been updated by abv.

SHA-1: 99dacd245b7b109c710a1c73f3058e6853044d5e


Detailed log of new commits:

Author: abv
Date: Mon Jan 8 10:53:37 2018 +0300

    Method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty).

abv

2018-01-08 14:44

manager   ~0073253

Regarding use of NULL, see discussion here:
https://stackoverflow.com/questions/3825668/checking-for-null-pointer-in-c-c

git

2018-01-10 22:30

administrator   ~0073297

Branch CR29399_2 has been created by abv.

SHA-1: 0b3b5136474971f064aceee87e7169cf9e9784dd


Detailed log of new commits:

Author: abv
Date: Sun Dec 24 09:44:04 2017 +0300

    0029399: Optimize reading of floating point values from text strings
    
    Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves performance by 3-10 times.
    
    Functions Atof(), Strtod(), Printf(), Sprintf(), Fprintf() are declared as extern "C" to be usable from C programs.
    
    Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.
    
    DRAW command QATestAtof and test perf fclasses strtod are added to control correctness and performance of strtod.
    
    Method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty).

Author: abv
Date: Wed Jan 10 21:17:35 2018 +0300

    0029399: Optimize reading of floating point values from text strings -- base dtoa.c
    
    Fast implementation of strtod downloaded from www.netlib.org/fp/dtoa.c (base version) is integrated as Standard_Strtod.cxx.

abv

2018-01-10 22:33

manager   ~0073298

I have pushed branch CR29399_2 which is the same as CR29399_1 (thus results of testing are relevant - see Jenkins job CR29399-master-abv), but split in two commits as per the laet remark -- the first commit is integration of base (unmodified) version of dtoa.c as downloaded from its source site, for future reference. Please review.

kgv

2018-01-10 22:36

developer   ~0073299

Please take the patch.

apn

2018-01-11 10:21

administrator   ~0073304

Combination -
OCCT branch : CR29399_1 SHA - a65440260e906c0a106b09921b07e04bed3e7cdc
Products branch : CR29399 SHA - aea4ea0bef935f11aa06f5979d609a4518fe82dc
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18356.309999999714 / 18498.959999999654 [-0.77%]
Products
Total CPU difference: 7448.9100000000135 / 7484.560000000007 [-0.48%]
Windows-64-VC10:
OCCT
Total CPU difference: 17878.77540679854 / 17960.90993329856 [-0.46%]
Products
Total CPU difference: 7986.861197499988 / 8020.448212799986 [-0.42%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

apn

2018-01-12 11:30

administrator   ~0073378

Last edited: 2018-01-12 13:19

There are following compilation errors on platforms with old compilers:

CentOS64-64-opt (gcc 4.4.7 20120313), Windows-32-VC9-opt, Windows-64-VC9-opt:

/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:945: error: 'default_random_engine' is not a member of 'std'
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:945: error: expected ';' before 'aRandomEngine'
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:946: error: 'uniform_real_distribution' is not a member of 'std'
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:946: error: expected primary-expression before 'double'
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:946: error: expected ';' before 'double'
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:949: error: 'aRandomEngine' was not declared in this scope
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:949: error: 'aRandomDistr' was not declared in this scope
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:995: error: 'default_random_engine' is not a member of 'std'
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:995: error: expected ';' before 'aRandomEngine'
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:996: error: 'uniform_int_distribution' is not a member of 'std'
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:996: error: expected primary-expression before '>' token
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:996: error: 'aRandomDistr' was not declared in this scope
/builds/IR-WEEK2_IR-WEEK2/CentOS64-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:1003: error: 'aRandomEngine' was not declared in this scope

http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK2_IR-WEEK2/view/OCCT%20compile/job/IR-WEEK2_IR-WEEK2-OCCT-CentOS64-64-opt-compile/2/parsed_console/
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK2_IR-WEEK2/view/OCCT%20compile/job/IR-WEEK2_IR-WEEK2-OCCT-Windows-32-VC9-opt-compile/2/parsed_console/
http://jenkins-test-08.nnov.opencascade.com/view/IR-WEEK2_IR-WEEK2/view/OCCT%20compile/job/IR-WEEK2_IR-WEEK2-OCCT-Windows-64-VC9-opt-compile/2/parsed_console/

Minimal working gcc version among testing stations is gcc 4.7.2.

git

2018-01-25 04:48

administrator   ~0073584

Branch CR29399_3 has been created by abv.

SHA-1: 9d6702c778c3f07a7528891098755f461c89b978


Detailed log of new commits:

Author: abv
Date: Sun Dec 24 09:44:04 2017 +0300

    0029399: Optimize reading of floating point values from text strings
    
    Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves its performance by 3-10 times.
    
    Functions Atof(), Strtod(), Printf(), Sprintf(), Fprintf() are declared as extern "C" to be usable from C programs.
    
    Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.
    
    DRAW command QATestAtof and test perf fclasses strtod are added to check correctness and performance of Strtod().
    
    Method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty).

Author: abv
Date: Wed Jan 10 21:17:35 2018 +0300

    0029399: Optimize reading of floating point values from text strings -- base dtoa.c
    
    Fast implementation of strtod downloaded from www.netlib.org/fp/dtoa.c (base version) is integrated as Standard_Strtod.cxx.

git

2018-01-25 11:08

administrator   ~0073587

Branch CR29399_3 has been updated forcibly by abv.

SHA-1: d0800af571fc19413fb537b7a2dab7280d447319

abv

2018-01-25 11:16

manager   ~0073588

I have updated implementation of test command to not rely on C++ random generator functionality missing in older compilers, and checked that it builds with VC9 - 14. Please check compilation on CentOS to see if it OK.

apn

2018-01-25 14:07

administrator   ~0073593

Last edited: 2018-01-25 14:08

There are following compilation errors on Linux platforms:

/builds/CR29399_3_CR29399/Debian70-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx: In function 'Standard_Integer QATestAtof(Draw_Interpretor&, Standard_Integer, const char**)':
/builds/CR29399_3_CR29399/Debian70-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:952:50: error: 'numeric_limits' is not a member of 'std'
/builds/CR29399_3_CR29399/Debian70-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:952:78: error: expected primary-expression before '>' token
/builds/CR29399_3_CR29399/Debian70-64-opt/OCCT/src/QANCollection/QANCollection_Test.cxx:952:79: error: '::max' has not been declared

http://jenkins-test-08.nnov.opencascade.com/view/CR29399_3_CR29399/view/OCCT%20compile/job/CR29399_3_CR29399-OCCT-CentOS64-64-opt-compile/1/parsed_console/
http://jenkins-test-08.nnov.opencascade.com/view/CR29399_3_CR29399/view/OCCT%20compile/job/CR29399_3_CR29399-OCCT-Debian70-64-opt-compile/1/parsed_console/

git

2018-01-26 12:46

administrator   ~0073608

Branch CR29399_3 has been updated by abv.

SHA-1: b6363621a88a9f8043fddf071c387de4e3f44ff7


Detailed log of new commits:

Author: abv
Date: Fri Jan 26 12:45:51 2018 +0300

    # correction for old GCC

abv

2018-01-26 12:46

manager   ~0073609

Correction is pushed, please re-check

apn

2018-01-26 14:40

administrator   ~0073612

Compilation is OK.
http://jenkins-test-08.nnov.opencascade.com/view/CR29399_3_CR29399/view/OCCT%20compile/

abv

2018-01-26 15:44

manager   ~0073613

Shall I re-run tests? or results of previous tests would be sufficient? (the last change affected only test command implementation, already tested on Windows).

apn

2018-01-26 19:21

administrator   ~0073621

Combination -
OCCT branch : CR29399_3 SHA - b6363621a88a9f8043fddf071c387de4e3f44ff7
Products branch : CR29399 SHA - aea4ea0bef935f11aa06f5979d609a4518fe82dc
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18323.489999999645 / 18449.779999999675 [-0.68%]
Products
Total CPU difference: 7452.380000000004 / 7437.72000000001 [+0.20%]
Windows-64-VC10:
OCCT
Total CPU difference: 17882.285429298623 / 17999.364179798602 [-0.65%]
Products
Total CPU difference: 7954.334988999978 / 7980.137554399978 [-0.32%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

kgv

2018-02-02 19:37

developer   ~0073738

After porting CAD Assistant and replacing fscanf with Strtod in ASCII STL reader,
reading a big ASCII STL file (AR_s1_clean.stla, 4.7 GiB):
- fscanf (vc10): 114 sec
- fscanf (vc14): 127 sec
- Strtod (vc14): 34 sec

Strtod is quite helpful.

git

2018-02-05 11:39

administrator   ~0073771

Branch CR29399 has been deleted by kgv.

SHA-1: 6992ed479f5bffdc993581f6ab6a21ba958c7dfe

git

2018-02-05 11:39

administrator   ~0073772

Branch CR29399_1 has been deleted by kgv.

SHA-1: 99dacd245b7b109c710a1c73f3058e6853044d5e

git

2018-02-05 11:39

administrator   ~0073773

Branch CR29399_2 has been deleted by kgv.

SHA-1: 0b3b5136474971f064aceee87e7169cf9e9784dd

git

2018-02-05 11:39

administrator   ~0073774

Branch CR29399_3 has been deleted by kgv.

SHA-1: b6363621a88a9f8043fddf071c387de4e3f44ff7

Related Changesets

occt: master 07bbde45

2017-12-24 06:44:04

abv


Committer: apn Details Diff
0029399: Optimize reading of floating point values from text strings

Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves its performance by 3-10 times.

Functions Atof(), Strtod(), Printf(), Sprintf(), Fprintf() are declared as extern "C" to be usable from C programs.

Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.

DRAW command QATestAtof and test perf fclasses strtod are added to check correctness and performance of Strtod().
Test perf draw restore is added to monitor performance of reading BREP files.

Minor off-topic corrections:
- method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty);
- Precision.hxx is included in BRepMesh_Vertex.hxx that uses it.
Affected Issues
0029399
mod - dox/overview/overview.md Diff File
mod - src/BRepMesh/BRepMesh_Vertex.hxx Diff File
mod - src/Interface/Interface_FileReaderData.cxx Diff File
mod - src/QANCollection/QANCollection_Test.cxx Diff File
mod - src/RWStl/RWStl_Reader.cxx Diff File
mod - src/Standard/FILES Diff File
mod - src/Standard/Standard_CString.cxx Diff File
mod - src/Standard/Standard_CString.hxx Diff File
mod - src/Standard/Standard_GUID.cxx Diff File
rm - src/Standard/Standard_SStream.cxx Diff File
mod - src/Standard/Standard_Strtod.cxx Diff File
rm - src/Standard/Standard_UUID.cxx Diff File
mod - tests/de/step_1/A3 Diff File
mod - tests/de/step_3/E6 Diff File
add - tests/perf/draw/restore Diff File
add - tests/perf/fclasses/strtod Diff File

occt: master 0edbf105

2018-01-10 18:17:35

abv


Committer: apn Details Diff
0029399: Optimize reading of floating point values from text strings -- base dtoa.c

Fast implementation of strtod downloaded from www.netlib.org/fp/dtoa.c (base version) is integrated as Standard_Strtod.cxx.
Affected Issues
0029399
add - src/Standard/Standard_Strtod.cxx Diff File

Issue History

Date Modified Username Field Change
2017-12-23 22:30 abv New Issue
2017-12-23 22:30 abv Assigned To => abv
2017-12-25 21:18 git Note Added: 0073128
2018-01-02 16:01 abv Note Added: 0073221
2018-01-02 16:04 abv Note Added: 0073222
2018-01-02 17:57 git Note Added: 0073223
2018-01-02 20:50 git Note Added: 0073224
2018-01-02 23:36 git Note Added: 0073225
2018-01-02 23:53 git Note Added: 0073226
2018-01-04 10:08 abv Note Added: 0073229
2018-01-04 10:25 git Note Added: 0073230
2018-01-04 22:58 abv Note Added: 0073231
2018-01-04 22:58 abv Status new => resolved
2018-01-04 22:58 abv Steps to Reproduce Updated
2018-01-04 23:31 abv File Added: strtod_benchmark.xlsx
2018-01-04 23:31 abv File Added: Standard_Strtod_adhoc.zip
2018-01-04 23:37 abv Note Added: 0073232
2018-01-04 23:38 abv Note Edited: 0073232
2018-01-05 18:22 abv Assigned To abv => kgv
2018-01-06 22:01 git Note Added: 0073235
2018-01-07 14:20 abv Note Added: 0073239
2018-01-07 16:37 kgv Note Added: 0073242
2018-01-07 17:13 kgv Note Added: 0073243
2018-01-07 18:45 kgv Note Added: 0073244
2018-01-07 18:45 kgv Assigned To kgv => abv
2018-01-07 18:45 kgv Status resolved => assigned
2018-01-07 21:20 git Note Added: 0073245
2018-01-07 21:21 abv Note Added: 0073247
2018-01-07 21:57 kgv Note Added: 0073248
2018-01-07 22:04 kgv Note Added: 0073249
2018-01-08 01:20 kgv Note Edited: 0073248
2018-01-08 10:53 git Note Added: 0073251
2018-01-08 14:44 abv Note Added: 0073253
2018-01-10 22:30 git Note Added: 0073297
2018-01-10 22:33 abv Note Added: 0073298
2018-01-10 22:36 kgv Note Added: 0073299
2018-01-10 22:36 kgv Assigned To abv => bugmaster
2018-01-10 22:36 kgv Status assigned => resolved
2018-01-10 22:36 kgv Status resolved => reviewed
2018-01-11 10:21 apn Test case number => Not needed
2018-01-11 10:21 apn Note Added: 0073304
2018-01-11 10:21 apn Status reviewed => tested
2018-01-12 11:30 apn Note Added: 0073378
2018-01-12 11:30 apn Assigned To bugmaster => abv
2018-01-12 11:30 apn Status tested => assigned
2018-01-12 13:19 apn Note Edited: 0073378
2018-01-25 04:48 git Note Added: 0073584
2018-01-25 11:08 git Note Added: 0073587
2018-01-25 11:16 abv Note Added: 0073588
2018-01-25 11:16 abv Assigned To abv => apn
2018-01-25 11:16 abv Status assigned => feedback
2018-01-25 14:07 apn Note Added: 0073593
2018-01-25 14:07 apn Assigned To apn => abv
2018-01-25 14:08 apn Note Edited: 0073593
2018-01-26 12:46 git Note Added: 0073608
2018-01-26 12:46 abv Note Added: 0073609
2018-01-26 14:40 apn Note Added: 0073612
2018-01-26 15:44 abv Note Added: 0073613
2018-01-26 19:21 apn Note Added: 0073621
2018-01-26 19:21 apn Assigned To abv => bugmaster
2018-01-26 19:21 apn Status feedback => tested
2018-01-26 19:24 apn Test case number Not needed => perf draw restore, perf fclasses strtod
2018-01-28 12:18 apn Changeset attached => occt master 07bbde45
2018-01-28 12:18 apn Changeset attached => occt master 0edbf105
2018-01-28 12:18 apn Assigned To bugmaster => apn
2018-01-28 12:18 apn Status tested => verified
2018-01-28 12:18 apn Resolution open => fixed
2018-02-02 19:37 kgv Note Added: 0073738
2018-02-05 11:39 git Note Added: 0073771
2018-02-05 11:39 git Note Added: 0073772
2018-02-05 11:39 git Note Added: 0073773
2018-02-05 11:39 git Note Added: 0073774
2018-06-29 21:15 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed
2020-10-09 10:51 abv Relationship added related to 0025170