Skip to content

Align stuctures for 64-bit platforms #328

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GermanAizek
Copy link
Contributor

@Atoptool,
Smaller size structure or class, higher chance putting into cpu cache, changes require checking using yours benchmark, I haven't figured out how to run bench in your project yet.

Most processors are already 64 bit, so the change won't make it any worse.

Info about technique:

https://stackoverflow.com/a/20882083
https://zijishi.xyz/post/optimization-technique/learning-to-use-data-alignment/
https://en.wikipedia.org/wiki/Data_structure_alignment

Affected structs:

  • extraparam 120 -> 112 bytes
  • vertval 136 -> 128 bytes
  • pridef 48 -> 40 bytes
  • syscap 64 -> 56 bytes

- extraparam 120 -> 112 bytes
- vertval 136 -> 128 bytes
- pridef 48 -> 40 bytes
- syscap 64 -> 56 bytes
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