Menu

Speed up cppcheck 2.17.0 execution

Lugnier
2025-04-25
2025-04-25
  • Lugnier

    Lugnier - 2025-04-25

    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

     
  • CHR

    CHR - 2025-04-25
     
  • Oliver Stöneberg

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.