Improve the time taken to validate and analyse large models#1397
Improve the time taken to validate and analyse large models#1397hsorby wants to merge 44 commits into
Conversation
…taken to collect equivalence ids.
We don't take advantage of the optional `absolute` parameter. (Regarding `file.close()`, it's done automatically, so no actual need for it.)
- Converted `std::set<uintptr_t>` to `std::unordered_set<uintptr_t>`, resulting in O(1) average per operation instead of O(log n) per operation. - Replaced double hash lookup with a single one.
`equivalentVariableGroups` wasn't being used as such. So, to replace it with `groupCount` means that we: - eliminate n copies of std::unordered_set; - remove all associated heap allocations from those sets and the vector itself; and - save memory by not storing data that's never queried.
It was in `AnalyserModel::areEquivalentVariables()`. `it2 == mPimpl->mEquivalentVariableCache.end()` never evaluated to `true`.
agarny
left a comment
There was a problem hiding this comment.
Looks good although I have sped up a few things here and there (see commit messages).
I can't see where |
I have taken that bit out now, as this was only part of the investigation phase of this work. |
To run the investigation tests set an environment variable
BENCHMARKING_MODEL_ROOTto the root directory of the unzipped contents of the benchmarking files zip in the associated issue.The longer tests are disabled with the DISABLED_ prefix on the test name, remove this prefix to run the test.