Changes between Initial Version and Version 1 of Ticket #4071
- Timestamp:
- 2016-10-13T18:26:09Z (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4071 – Description
initial v1 40 40 end S; 41 41 }}} 42 Model M0 has 10 variables and equations. Model M contains 5 instances of model M0, so it has 50 variables . Model S contains 10000 instances of M, so it has half a millionequations. This test case has no physical meaning, but its structure is representative of many large-scale models, which contain large numbers of instances of the same basic models.42 Model M0 has 10 variables and equations. Model M contains 5 instances of model M0, so it has 50 variables and equations. Model S contains 10000 instances of M, so it has half a million variables and equations. This test case has no physical meaning, but its structure is representative of many large-scale models, which contain large numbers of instances of the same basic models. 43 43 44 I have run instantiateModel(S)with and without {{{-d=newInst}}} on my i5 4200 @1.6 GHz, using OpenModelica-v1.11.0-dev-127-g043a756-64bit on Windows 10. These are the results44 I have run {{{instantiateModel(S)}}} with and without {{{-d=newInst}}} on my i5 4200 @1.6 GHz, using OpenModelica-v1.11.0-dev-127-g043a756-64bit on Windows 10. These are the results 45 45 || || Time [s] || Memory [MB] || 46 46 ||oldInst|| 120|| 4500|| … … 51 51 On the other hand, I was hoping for a much more drastic improvement. The performance with newInst is around 20000 equations/s, which seems to me still quite slow, and about 5 kB/equation, which still seems to me an excessive amount of memory. I have tried a test case with half instances in model S, and both time and memory is halved, so it makes sense to compute this kind of average quantities. 52 52 53 Note that the model doesn't have connections, doesn't use inheritance, and only uses basic Real types. At the end of the day is just re-instantiating the same model over and over again.53 Note that the model doesn't have connections, doesn't use inheritance, and only uses basic Real types. At the end of the day, it is just re-instantiating the same model over and over again. 54 54 55 Q1: are there further optimizations possible, to exploit the repeated instances of the same class 55 Q1: are there further optimizations possible, to exploit the repeated instances of the same class? 56 56 57 57 Q2: can you explain the memory usage of 5 kB for each variable/equation?