storm
storm copied to clipboard
Improve performance of ExpressionEvaluator for RationalFunction
Parsing of RationalFunction
in the DRN format is slow.
Profiling revealed that the main issue lies in the following line:
https://github.com/moves-rwth/storm/blob/2433671b7d08d069cdcf0feee0971d1783d9ef26/src/storm-parsers/parser/ValueParser.cpp#L23
For an example profiling run, 97.5% of the total time was spent in this line. Out of this time, 78.4% was spent in ExpressionEvaluator::asRational
and 18.8% in ExpressionParser::parseFromString
.
Using the placeholders introduced in 8b77f7f did shorten the parsing time by a factor of 100 for some files, because we only need to parse each RationalFunction
once. For the moment this helps, but in the long term we should improve the performance of the ExpressionEvalulator
.