Changes between Initial Version and Version 1 of Ticket #4398, comment 20
- Timestamp:
- 2017-10-25T17:41:10Z (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4398, comment 20
initial v1 5 5 I'm not sure I understand why this should be useful to remove common subexpressions. 6 6 7 I thought that CSE would basically require to build a n ordered list or hash table of sub-expressions as they are encountered while parsing the DAEs, replacing any instance of an already encountered expression with an auxiliary variable. For a model with N equations each containing at most K sub-expressions this would be O(N log(N)) if an ordered listis used, or O(N) if a hash table is used. Do I miss something?7 I thought that CSE would basically require to build a binary tree or hash table of sub-expressions as they are encountered while parsing the DAEs, replacing any instance of an already encountered expression with an auxiliary variable. For a model with N equations each containing at most K sub-expressions this would be O(N log(N)) if a binary tree is used, or O(N) if a hash table is used. Do I miss something?