Skip to content

refactor: optimize struct alignment across core networking headers#179

Merged
Morcules merged 2 commits intoMorcules:mainfrom
DonyDominic:main
Jan 27, 2026
Merged

refactor: optimize struct alignment across core networking headers#179
Morcules merged 2 commits intoMorcules:mainfrom
DonyDominic:main

Conversation

@DonyDominic
Copy link
Contributor

@DonyDominic DonyDominic commented Jan 27, 2026

Reordered SwiftNetClientConnection members to group 8-byte pointers together, which eliminated 8 bytes of padding. This reduced the total struct size from 480 to 472 bytes, making the connection object more memory-efficient and cache-friendly.

Fixes #173

@Morcules
Copy link
Owner

Thank you for the contribution 🚀

@Morcules Morcules merged commit 61194a8 into Morcules:main Jan 27, 2026
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.

Fix alignment inside structs

2 participants