MantisBT - Community
View Issue Details
0024044Community[OCCT] OCCT:Foundation Classespublic2013-06-25 21:382019-03-12 06:55
Roman Lygin 
bugmaster 
normalintegration request 
closedfixed 
ALL
[OCCT] 6.6.0 
[OCCT] 6.7.0[OCCT] 6.7.0 
Not needed
0024044: Performance improvements: Foundation Classes (math)
Continuation of series started in 0024042

*math
- use of automatic allocation (on stack) to minimize heap allocation. Size constants are selected such to avoid stack overflow yet maximizing chances to favor stack allocation.

N/A
No tags attached.
related to 0024042closed apn Community Performance improvements: Foundation Classes 
parent of 0030552new kgv Community Foundation Classes - Stack overflow due to math_SingleTab static array size 
related to 0025746closed bugmaster Open CASCADE Excessive memory use in math_Matrix 
child of 0024045closed bugmaster Community Invalid test case for matrix-vector multiplication 
Not all the children of this issue are yet resolved or closed.
Issue History
2013-06-25 21:38Roman LyginNew Issue
2013-06-25 21:38Roman LyginAssigned To => abv
2013-06-25 21:43Roman LyginNote Added: 0024866
2013-06-25 21:43Roman LyginStatusnew => resolved
2013-06-25 21:49Roman LyginRelationship addedchild of 0024045
2013-06-25 22:00Roman LyginRelationship addedrelated to 0024042
2013-06-26 06:59abvNote Added: 0024869
2013-06-26 06:59abvAssigned Toabv => Roman Lygin
2013-06-26 06:59abvStatusresolved => assigned
2013-06-27 22:41Roman LyginNote Added: 0024907
2013-06-27 22:41Roman LyginAssigned ToRoman Lygin => abv
2013-06-27 22:41Roman LyginStatusassigned => feedback
2013-07-12 07:13abvNote Added: 0025041
2013-07-12 07:13abvAssigned Toabv => Roman Lygin
2013-07-12 07:13abvStatusfeedback => resolved
2013-07-17 00:19Roman LyginNote Added: 0025090
2013-07-17 00:19Roman LyginAssigned ToRoman Lygin => abv
2013-07-17 00:19Roman LyginStatusresolved => reviewed
2013-07-18 16:21apnNote Added: 0025114
2013-07-18 16:21apnTest case number => Not needed
2013-07-18 16:21apnAssigned Toabv => Roman Lygin
2013-07-18 16:21apnStatusreviewed => assigned
2013-07-18 16:21apnTarget Version => 6.7.0
2013-08-15 15:04mkvNote Added: 0025320
2013-08-15 15:06mkvAssigned ToRoman Lygin => bugmaster
2013-08-15 15:06mkvStatusassigned => resolved
2013-08-15 15:06mkvStatusresolved => reviewed
2013-08-15 15:06mkvStatusreviewed => tested
2013-08-17 12:50bugmasterChangeset attached => occt master b28e7cc6
2013-08-17 12:50bugmasterStatustested => verified
2013-08-17 12:50bugmasterResolutionopen => fixed
2013-12-19 13:52bugmasterStatusverified => closed
2013-12-19 13:56bugmasterFixed in Version => 6.7.0
2015-03-09 19:36msvRelationship addedrelated to 0025746
2019-03-12 06:55kgvRelationship addedparent of 0030552

Notes
(0024866)
Roman Lygin   
2013-06-25 21:43   
The fix pushed to the repository
(0024869)
abv   
2013-06-26 06:59   
Defining size of array independently in CDL and GXX is potentially dangerous. I suggest that definition of constants N, M, and MN in GXX should be done via sizeof() of relevant class fields.

The same comment as to 0024042: if you have some numbers of performance increase this improvement gives in your case, please share.
(0024907)
Roman Lygin   
2013-06-27 22:41   
For performance gain - please refer to 0024042.

Regarding sizeof(), do you see any better implementation than replacing each occurrence with something like (sizeof(Buf) / sizeof(Buf[0])). Though I share the desire to avoid risk of discrepancy this change would undermine code clarity, so I am not sure this is better than an explicit comment in the code. But I will change to whatever you prefer.
(0025041)
abv   
2013-07-12 07:13   
> replacing each occurrence with something like (sizeof(Buf) / sizeof(Buf[0]))

Yes, this is what I had in mind. Please check the amended version in CR24044_1
(0025090)
Roman Lygin   
2013-07-17 00:19   
The amendment is fine. Thanks for making it and sorry for the delay - I thought you expected me to *make* the amendment not just to *review* it.
(0025114)
apn   
2013-07-18 16:21   
Dear BugMaster,

Branch CR24044_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: fdbd14f0acc8325642ec1fd0553de0611f7fd57f

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 1767 (1767 on master)

products component :
Linux: 0 (0 on master)
Windows: 288 (288 on master)

Regressions:
bugs moddata_2 bug524
http://occt-tests/CR24044-1-master-occt/Debian60-64/summary.html [^]

Improvements:
No improvements

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 366693152 / 365661156
Total CPU difference: 43746.34000000115 / 44445.42000000096

Testing on Windows:
Total MEMORY difference: 427509152 / 426010604
Total CPU difference: 43613.15625 / 31424.5

There are not differences in images found by testdiff.
(0025320)
mkv   
2013-08-15 15:04   
Dear BugMaster,
The fix should be integrated along with 0024045