Skip to content

Conversation

@firewave
Copy link
Collaborator

No description provided.

@firewave
Copy link
Collaborator Author

firewave commented Jan 20, 2026

Using the code from https://trac.cppcheck.net/ticket/10765#comment:4:
Clang 21 - 2,713,071,190 -> 2,405,951,315

The actual amount of isAliasOf() calls is reduced from 2,593,432 (16% of Ir) to 23,464 (0,2% of Ir).

There is newly introduced overhead in Token::isAliasOf() (over 5% of Ir).

@firewave firewave changed the title Token: introduced cache for isAliasOf() calls refs #10765 - Token: introduced cache for isAliasOf() calls Jan 20, 2026
@firewave
Copy link
Collaborator Author

Unfortunately it does not seem to help much with the runtime of the CI.

Before:
Check time: cli/cmdlineparser.cpp: 40m 55.757s

After:
Check time: cli/cmdlineparser.cpp: 39m 8.063s

@firewave
Copy link
Collaborator Author

firewave commented Jan 20, 2026

Running it on https://github.com/firewave/mame_regtest/blob/master/mame_regtest.c provides better results:
Clang 21 - 20,959,710,351-> 16,478,128,014

@firewave

This comment was marked as off-topic.

@firewave firewave changed the title refs #10765 - Token: introduced cache for isAliasOf() calls refs #10765/#11262 - Token: introduced cache for isAliasOf() calls Jan 21, 2026
@sonarqubecloud
Copy link

@firewave
Copy link
Collaborator Author

This causes false positives in the selfcheck:

lib/symboldatabase.cpp:890:17: style: Variable 'scope' can be declared as reference to const [constVariableReference]
    for (Scope& scope : scopeList) {
                ^
lib/symboldatabase.cpp:945:17: style: Variable 'scope' can be declared as reference to const [constVariableReference]
    for (Scope& scope : scopeList) {
                ^

@firewave
Copy link
Collaborator Author

No differences with #7800.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant