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,741,990,149 -> 2,438,803,169
GCC 15 - 2,842,020,801 -> 2,487,141,306

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-> 15,716,108,542
GCC 15 - 20,784,491,178 -> 15,732,199,035

@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
@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.

@sonarqubecloud
Copy link

@firewave
Copy link
Collaborator Author

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

Looks better now - CI seemed to be a tad slower in the previous case.

Before:
Check time: cli/cmdlineparser.cpp: 23m 50.534s

After:
Check time: cli/cmdlineparser.cpp: 18m 17.478s

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