Skip to content

Decrease the number of padding bytes in the Node Struct so it fits a lower quanta #1580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

aliyevaa
Copy link
Contributor

Heap --showInternalFragmentation shows that we are loosing 14 bytes to padding in Node instances.
Class: 'Node' [instance size 104, allocation size 112] - Swift, ARC {
...
}
16: keyAndFingerprint;
<< 7 alignment bytes >>
64: definitionLocation;
88: isTraced;
<< 7 alignment bytes >>
96: cachedHash;
}
Moving isTraced up here will push Node instance allocations to the next quanta (96)

@aliyevaa aliyevaa requested review from owenv and artemcm April 10, 2024 18:56
@artemcm
Copy link
Contributor

artemcm commented Apr 10, 2024

@swift-ci test

@artemcm
Copy link
Contributor

artemcm commented Apr 11, 2024

@swift-ci test Windows platform

@artemcm artemcm merged commit 8b730e9 into main Apr 11, 2024
3 checks passed
@artemcm artemcm deleted the Node-struct-members-reordering branch April 11, 2024 22:03
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.

3 participants