Opened 8 years ago
Closed 8 years ago
#4552 closed defect (fixed)
EvaluateParameters scales as O(N^2) with large parameter arrays
| Reported by: | Francesco Casella | Owned by: | Patrick Täuber |
|---|---|---|---|
| Priority: | high | Milestone: | 1.13.0 |
| Component: | Backend | Version: | |
| Keywords: | Cc: |
Description
Thanks to Thomas Beutlich, we have recently added a new set of tests to the ScalableTestSuite which use large data arrays for table-based signal generation.
The performance of evaluateParameters in the set of tests ScalableTestSuite.Elementary.Tables.ScaledExperiments.TimeTable_N_XXX is the following:
| N | Time |
|---|---|
| 2000 | 1.36 |
| 4000 | 5.52 |
| 8000 | 21.73 |
which clearly scales as O(N2). BTW, I don't see any Evaluate=true annotation on the data tables, so I'm not sure why and where all this time is spent evaluating parameters.
Apparently, this doesn't happen with ScalableTestSuite.Elementary.Tables.ScaledExperiments.CombiTimeTable_N_XXX. I'm not sure why, since both share the same large scale table array.
Change History (3)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → accepted |
comment:3 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
The problem was a function that gets all the crefs of an algorithm, which are discarded afterwards. With OMCompiler/73e4cc5 the scaling of evaluateParameters is O(n) for the models from above:
| N | Time |
|---|---|
| 2000 | 0.1176 |
| 4000 | 0.2662 |
| 8000 | 0.5347 |

See also #1283