Forked from
Dynare / preprocessor
Source project has a limited visibility.
-
Sébastien Villemot authored
Commit 23b0c12d introduced caching in chain rule derivation (used by block decomposition), which increased speed for mfs > 0, but actually decreased it for mfs=0. This patch introduces the pre-computation of derivatives which are known to be zero using symbolic a priori (similarly to what is done in the non-chain rule context). The algorithms are now identical between the two contexts (both symbolic a priori + caching), the difference being that in the chain rule context, the symbolic a priori and the cache are not stored within the ExprNode class, since they depend on the list of recursive variables. This patch brings a significant performant improvement for all values of the “mfs” option (the improvement is greater for small values of “mfs”).
Sébastien Villemot authoredCommit 23b0c12d introduced caching in chain rule derivation (used by block decomposition), which increased speed for mfs > 0, but actually decreased it for mfs=0. This patch introduces the pre-computation of derivatives which are known to be zero using symbolic a priori (similarly to what is done in the non-chain rule context). The algorithms are now identical between the two contexts (both symbolic a priori + caching), the difference being that in the chain rule context, the symbolic a priori and the cache are not stored within the ExprNode class, since they depend on the list of recursive variables. This patch brings a significant performant improvement for all values of the “mfs” option (the improvement is greater for small values of “mfs”).