astutils.cpp: fixed suboptimal string comparisons / small cleanup#6799
astutils.cpp: fixed suboptimal string comparisons / small cleanup#6799firewave merged 3 commits intocppcheck-opensource:mainfrom
Conversation
|
What is the performance gain here? Why would |
Less than a percent in the example I tested but as usual that depends how hot the path is.
It gets rid of the |
Seems like all three compilers do |
I think it is always a single character. I would have just changed it to |
|
when I benchmarked in quick bench I did not see a difference in performance but perhaps my benchmark was not well written. |
in benchmark I wrote and executed locally it seems the strcmp is considerably faster. 👍 |
|
There's also benchmark in these tickets: |
No description provided.