Skip to content

Save Memory with fieldalignment#30

Merged
Lexer747 merged 1 commit intomainfrom
dev
Aug 31, 2025
Merged

Save Memory with fieldalignment#30
Lexer747 merged 1 commit intomainfrom
dev

Conversation

@Lexer747
Copy link
Owner

@Lexer747 Lexer747 commented Aug 31, 2025

This patch uses the fieldalignment tool to save memory across the board. I don't think this will dramatically improve performance but it's "free" memory savings. Most of the hot paths haven't changed because the savings are all related to moving pointers.

Including tests this saves 856 bytes. Excluding tests it's still 552 bytes saved.

This patch also adds the fieldalignment lint to CI so that I actually maintain these savings.

Closes #26

@Lexer747 Lexer747 force-pushed the dev branch 3 times, most recently from a359901 to d2d8d5d Compare August 31, 2025 20:32
@Lexer747 Lexer747 changed the title Dev Save Memory with fieldalignment Aug 31, 2025
This patch uses the `fieldalignment` tool to save
memory across the board. I don't think this will
dramatically improve performance but it's "free"
memory savings. Most of the hot paths haven't
changed because the savings are all related to
moving pointers.

Including tests this saves 856 bytes. Excluding
tests it's still 552 bytes saved.

This patch also adds the `fieldalignment` lint to
CI so that I actually maintain these savings.

Closes #26
@Lexer747 Lexer747 merged commit 0e0adc6 into main Aug 31, 2025
3 of 4 checks passed
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.

Use struct align tool to save memory

1 participant