Improve efficiency of output type check in preprocessor generated files
.mod files in perfect foresight may spend an inordinate amount of time checking which output format is required. The problem is the check of the type if ~isoctave && matlab_ver_less_than('9.8') in +sparse\\dynamic\_g1.m, which, in my example, took 30% of execution time because it was called 6 million times. This is inefficient, because the configuration does not change during runtime.
Ideally, we would detect the configuration once, e.g. in dynare.m and then pass it to the preprocessor so that we don't need that check in every iteration. However, one may need to be careful for
- possible issues in parallel configurations
- when workflows directly call the preprocessor (e.g. at the ECB)
