Skip to content
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

v2 word: packed + alignment + endianness #15

Open
malachib opened this issue Jan 1, 2025 · 0 comments
Open

v2 word: packed + alignment + endianness #15

malachib opened this issue Jan 1, 2025 · 0 comments

Comments

@malachib
Copy link
Contributor

malachib commented Jan 1, 2025

Under cases where v2::words live in a packed structure, pointer lookups to underlying integer can be an issue.

It seems that inline methods are happier than external functions such as operator==(lhs, rhs) in this situation.

This implies that inline methods somehow are OK with a mis-aligned this pointer. More exploration is needed:

  • Use a packed struct of foreign endian v2::word
  • See if indeed inline methods are that much happier, and if so, why - i.e. doing word math on an off-alignment value one would think would be similarly disruptive regardless of inline method or not, so see what, if any, the difference is
malachib added a commit that referenced this issue Jan 1, 2025
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

No branches or pull requests

1 participant