Skip to content

Conversation

@frankmcsherry
Copy link
Member

The Bytesable trait is what indicates how we want to serialize messages, should we need to do that. There is an advantage to data containers being u64 aligned, specifically for columnar implementations but potentially for other implementations. This PR adds up to 7 bytes for each message to ensure that each part ends up u64 aligned. With these changes, the columnar example does not need to relocate (memcpy) in order to get aligned data.

Tbd: other containers (e.g. Vec, FlatStack) don't have the same defensive measures in place yet, and we'll want to figure out how to prevent them from messing anything up either. Their ContainerBytes implementation could do this, or the Bytesable implementation for Message could round up once it has serialized everything.

Copy link
Member

@antiguru antiguru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulus comments

@frankmcsherry frankmcsherry merged commit 90bd8aa into TimelyDataflow:master Jan 23, 2025
7 checks passed
@frankmcsherry frankmcsherry deleted the align_messages_to_u64 branch January 23, 2025 14:37
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.

2 participants