We have modified cppcheck 2.17.0 code to speed execution. Attached is a svn patch.
We added a cache (-15min) and use a simplified Match function (MatchOneOf) for pattern like "x|y|z" (-5min).
Run before modification 50 min.
Looking at the changes I have the feeling you were not using the matchcompiler. Token::Match() with literals are being converted to actual code by that. Only matches with run-time strings are usually showing up in the profiler.
And if a new match function is being introduced that should also be an internal check which makes sure that the given expression is valid for it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
We have modified cppcheck 2.17.0 code to speed execution. Attached is a svn patch.
We added a cache (-15min) and use a simplified Match function (MatchOneOf) for pattern like "x|y|z" (-5min).
Run before modification 50 min.
Cédric
Please open a PR at https://github.com/danmar/cppcheck/pulls
Looking at the changes I have the feeling you were not using the matchcompiler.
Token::Match()
with literals are being converted to actual code by that. Only matches with run-time strings are usually showing up in the profiler.And if a new match function is being introduced that should also be an internal check which makes sure that the given expression is valid for it.