reduced padding in some classes/structs#4295
Merged
danmar merged 2 commits intocppcheck-opensource:mainfrom Jul 24, 2022
Merged
reduced padding in some classes/structs#4295danmar merged 2 commits intocppcheck-opensource:mainfrom
danmar merged 2 commits intocppcheck-opensource:mainfrom
Conversation
Collaborator
Author
|
It also improves overall performance a bit. Scanning Clang 13 But it caused a small visible regression in |
Collaborator
Author
|
At least the following boundary alignment padding was saved: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on reviewing
-Wpaddedwarnings in frequently used classes/structs. There's also some potential candidates insimplecpp.If wanted to can try to provide
sizeof()before and after.I did a
valgrind --tool=massifrun onmame_regtestand it showed a small difference in the memory usage ofToken.Before:
2.3312988281 MiB: Token (lib/token.cpp:57)After:
2.2017822266 MiB: Token (lib/token.cpp:57)I did not profile this with
callgrind(yet).